POST
|
Thanks Trish, I gave that a try but I am still getting exterior borders around the dissolved polys. Is there any way to keep only interior lines where the polys change? Or am I not doing this right?
... View more
11-18-2013
06:24 AM
|
0
|
0
|
416
|
POST
|
Trish, that's a really interesting solution. I'm afraid I made a mistake with the screenshot though -- it should look something like this. [ATTACH=CONFIG]29094[/ATTACH] In other words, I'd only like to preserve interior borders between polygons. Can that be achieved with symbol levels too? Thanks, Robert
... View more
11-13-2013
02:54 PM
|
0
|
0
|
416
|
POST
|
Hi all, I've been working with a polygon feature class that looks something like this: [ATTACH=CONFIG]29055[/ATTACH] Wherever two polygons of different types (shown above with different colors) meet there needs to be a thick dashed line between them. The solution so far has been to keep a separate feature class for the lines, which of course needs to be updated every time the polys change. This has gotten to be pretty tedious and is creating a lot of redundancy in our data. Is there any type of map layer that can be generated on-the-fly based on spatial relationships and attribute data of a feature class? I'm guessing a geometric network would be involved, but that's all I've got. Does anyone have any insights? Thanks, Robert
... View more
11-12-2013
11:30 AM
|
0
|
5
|
1624
|
POST
|
Derek of the JS team was kind enough to point me in the right direction: map.reposition(); Boom! No more pan.
... View more
09-19-2013
01:45 PM
|
0
|
0
|
456
|
POST
|
Hi Dev, I'm developing in Chrome 29.0.1547.66 but it happens in Firefox 24.0 as well. I'm not explicitly calling any resize functions -- in fact the only code I have so far is creating the map and adding some layers. This is how I create the map: require(['esri/map'], function(Map) {
// Create and add map div
$('<div/>', {id: 'map'}).appendTo('#bounds');
// Reference map div
$map = $('#map');
// Create map
map = new Map('map', {
logo: false,
});
// Add tiled layers
addLayers();
}); The code to add the layers is rather long but I'm basically just forming URLs, creating layer objects, and passing them to map.AddLayer(). There are 3 tiled layers and 1 dynamic. They all work fine as long as the map is in a fixed on-screen position. Thanks again.
... View more
09-18-2013
09:20 AM
|
0
|
0
|
456
|
POST
|
Hi everyone, I have a map that I'm initializing off-screen and sliding in using jQuery. For some reason zooming in with the scroll wheel or by double-clicking causes the map to simultaneously pan down (or pan up when zooming out). Using the slider controls works fine. Also if I disable the animation and create it on-screen it zooms normally. I'm guessing it has something to do with the relative position of the map to where it was created, but I don't imagine I have much control over that. Does anyone have any thoughts on this? Here's how I'm styling the map: #map {
bottom: -450px;
height: 450px;
position: fixed;
width: 100%;
} And this is my animation function: toggleMap: function() {
// New bottom value
var newBottom;
if (isShowing) {
newBottom = -MAP_HEIGHT;
}
else {
newBottom = 0;
}
// Set this here in case they reverse the animation before it finishes
isShowing = !isShowing;
// Change link text
$('#gis-link').text(!isShowing ? 'show' : 'hide');
// Animate
$map.animate({
bottom: newBottom
});
}, Thanks!
... View more
09-18-2013
08:44 AM
|
0
|
3
|
1314
|
POST
|
Thanks again Derek. Could you explain what "circle" means in that selector? It's not working as is but sounds promising!
... View more
08-28-2013
07:37 AM
|
0
|
0
|
744
|
POST
|
Thanks Derek! The _layer suffix did the trick. The pulse effect is causing strange problems for me though in Chrome (it bounces around the screen when you pan). I have an idea for another effect, but I would need a selector for just that one graphic from the graphics layer. I don't suppose that's possible?
... View more
08-27-2013
07:25 AM
|
0
|
0
|
744
|
POST
|
I noticed that the Mobile ArcGIS.com tutorial uses CSS to make the GPS indicator (a blue dot) pulse when shown. This is the selector: #map_graphics_layer { -webkit-animation-duration:3s; -webkit-animation-iteration-count:infinite; -webkit-animation-name:pulse; -webkit-animation-timing-function:ease-in-out; } Unfortunately I can't do this because I use the map.graphics layer for other things that shouldn't pulse. Instead I made a custom graphics layer for the GPS point and gave it its own ID, like "gps-graphics-layer". I tried using the same CSS on #gps-graphics-layer but that didn't work. Does anyone know how to do this? Thanks!
... View more
08-26-2013
04:10 PM
|
0
|
5
|
3457
|
POST
|
Well this is embarrassing... I thought GeometryService was a utility class that would do the projection locally. Now I see it wants a URL, so I tried the ArcGIS Online one and it works! Thanks for the snippet Jason, that was a big help. I'm still wondering though, is this really the only way to add geometry with a different spatial reference? Seems like a lot of overhead for something so simple...
... View more
08-26-2013
01:41 PM
|
0
|
0
|
457
|
POST
|
Thanks for the tip Jason, I dropped your code in but I'm still getting "Cannot read property 'query' of undefined" when it calls geometryService.project. I can't figure out for the life of me why there's a query here... I do have a couple of query tasks initiated but I'm not using them here. And yes, all the variables are globals so they should be visible throughout.
... View more
08-26-2013
12:47 PM
|
0
|
0
|
457
|
POST
|
Hi all, I have a State Plane-based map to which I'd like to add a point (WGS84) for the user's location. This is my code: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(location) { gpsPoint.setLatitude(location.coords.latitude); gpsPoint.setLongitude(location.coords.longitude); gpsGraphic.setGeometry(gpsPoint); gpsGraphic.setSymbol(gpsSymbol); map.graphics.add(gpsGraphic); map.centerAndZoom(gpsPoint, 12); gpsIsOn = true; }); } So far I'm getting the error: Map: Geometry (wkid: 4326) cannot be converted to spatial reference of the map (wkid: 2229) Specifically it's the centerAndZoom call that is throwing the error. I found this post which suggested using a geometry service to reproject the point: // Project gpsPoint to State Plane var projectParams = new esri.tasks.ProjectParameters(); projectParams.geometries = [gpsPoint]; projectParams.outSR = map.spatialReference; var defer = geometryService.project(projectParams); dojo.when( defer, function(projectedGeometry) { if (projectedGeometry.length > 0) { gpsPoint = projectedGeometry[0]; } }); But that gives the error: Uncaught TypeError: Cannot read property 'query' of undefined No idea where that's coming from! I've checked the projectParams object and both the geometry and outSR look fine. Can anyone tell what I'm doing wrong here, or what a better method might be? Many thanks
... View more
08-26-2013
09:01 AM
|
0
|
5
|
1023
|
POST
|
Sure enough, I skipped the MXD that was throwing the error and it went on fine. I ran the MXD Doctor on it and still no dice, but one manual edit won't kill me 🙂 Thanks again.
... View more
08-19-2013
12:29 PM
|
0
|
0
|
496
|
POST
|
I'm on 10 SP5. Interesting that it runs fine for you - now I'm wondering if it's something with the MXD.
... View more
08-19-2013
12:07 PM
|
0
|
0
|
496
|
POST
|
I'm trying to write a script to update a TextElement object in a batch of MXDs. (I know there's a similar discussion going on right now but I didn't see anything relevant to my issue.) So far I've been getting the error: RuntimeError: TextElementObject: Error in setting text This is my code: import os
import arcpy
# Loop over MXDs
root = r'H:\myDir'
for file in os.listdir(root):
print 'Working on ' + file
path = os.path.join(root, file)
mxd = arcpy.mapping.MapDocument(path)
text_elms = arcpy.mapping.ListLayoutElements(mxd, 'TEXT_ELEMENT')
the_text_elm = None
# Loop over text elements to find subtitle
for text_elm in text_elms:
i = text_elm.text.find('Archit')
if i > -1:
the_text_elm = text_elm
break
# Update
if the_text_elm:
i = the_text_elm.text.find('Archit')
new_text = the_text_elm.text[:i] + 'Historic Resources'
the_text_elm.text = new_text
mxd.save()
else:
print 'Did not update' I've checked every step of the routine up until the text is set and everything looks fine (no unexpected nulls). Can anyone see anything wrong with what I'm doing here? Thanks!
... View more
08-19-2013
11:21 AM
|
0
|
4
|
1013
|
Title | Kudos | Posted |
---|---|---|
3 | 10-26-2012 01:53 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|