POST
|
Thanks Thomas, that was helpful, though it hasn't helped me to fully solve the problem. I can get IE to work with my map if I set the compatibility mode to 'edge' (though only if I do so manually). By setting it with my html header meta, I can get most maps to load fine in IE, except when I load multiple ImageLayers (even if not set to visible). For now, I guess I'll set my map up to only provide a single ImageLayer if the client is IE, along with a note to suggest using an alternate browser.
... View more
06-15-2017
09:20 AM
|
0
|
1
|
824
|
POST
|
My map application is working beautifully in Chrome and FireFox. But when I try it in Internet Explorer (v11), the api is looking like there is a glitch. Nothing loads and my console shows this error: SCRIPT5009: 'Set' is undefined File: 4.3, Line: 18, Column: 307 Clicking to view that location in the debugger shows the cursor at the beginning of a throw statement within: d.result=void 0===c&&d.cjs?d.cjs.exports:c;ra(d)}return d.result},ya=0,G=function(d){try{ya++,d()}catch(hb){throw hb;}finally{ya--}pa()&&D("idle",[])}, No errors or warnings are present to show possible issues arising from my own javascript coding. Any suggestions on how to get past this? Thanks!
... View more
06-09-2017
01:43 PM
|
0
|
3
|
3816
|
POST
|
Thanks - that gave me what I needed! I've implemented it just a little differently. For the record... require([ "esri/Map", "esri/views/MapView", "esri/geometry/Extent", "esri/core/watchUtils", ... ], function(Map, MapView, Extent, watchUtils, ... ) { var map = new Map({ basemap: "topo", }); var view = new MapView({ container: "map-container", map: map, ... }); //dpLayers brings a set of layers with their details from //a database via JSON. mapLayers is an array I keep for various //reference purposes, but is very handy for adding the watches I //was asking about in this post var mapLayers = []; var dpLayersLen = dpLayers.length; for (var i = 0; i < dpLayersLen; i++) { switch (dpLayers.layerType) { case 'raster': var imgLayer = new ImageryLayer({ title: dpLayers.title, ... }); mapLayers.push(imgLayer); map.add(mapLayers); break; case 'vector': var featureLayer = new FeatureLayer({ title: dpLayers.title, ... }); mapLayers.push(featureLayer); map.add(mapLayers); break; } } var c = mapLayers.length; for (var i = 0; i < dpLayersLen; i++) { watchUtils.watch(mapLayers, 'visible', function () { alert('Layer visibility changed!')}); }
... View more
05-30-2017
12:03 PM
|
2
|
0
|
2680
|
POST
|
Thanks! But... I don't believe that will work. I've tried adding that code and similar, but am getting no response. My console does not indicate any javascript errors. map.allLayers.on("change", function(event) { alert('allLayers change'); }); The reason I don't think that code is relevant is that it is detecting change on map.allLayers but the changes I'm looking for are about visibility of the layers within the map. Turning a layer off from the layerList widget doesn't 'remove' it from the map, it just sets its visibility to false. The sandbox example unfortunately just demonstrates detecting the initial inclusion of a layer in the map, not subsequent client-triggered changes to map layers. Thus I've tried watching map.layers but that doesn't detect the changes to visibility either. I'm not finding the watch system to be very intuitive... should I apply a watch to each layer individually? And if so, how? I'm using both FeatureLayers and ImageLayers. I'd also like to detect a change to the basemap. Thanks!
... View more
05-30-2017
10:46 AM
|
0
|
2
|
2680
|
POST
|
I need to run a little code everytime a layer is turned on or off. Users will control layers through a LayerList widget. I've seen another post on watching layer lists(https://community.esri.com/message/683587-watch-on-layerlist-not-working-43?q=watch ), but it doesn't seem to cover what I need. I've also tried map.layers.on("change", function(){ ... }); and about everything else I can think of, but just can't trigger a response when I click a layer on or off. Thanks for your suggestions!
... View more
05-28-2017
04:04 PM
|
0
|
4
|
4649
|
POST
|
OK, thanks! I'll just get everything changed over to WebMerc.
... View more
05-25-2017
08:07 PM
|
0
|
0
|
441
|
POST
|
As it exists, I'm using a batch of ImageServer and MapServer data in California state plane, while my view is using web mercator. I'd like to use some 'zoom to extent' actions. Simply updating the view extent with the layer extents sends me off to odd parts of the world. So apparently any reproject on the fly works for the services, but not when transferring extents - the spatialReference property seems to have no effect. Tried both: view.extent = featureLayer.fullExtent; view.goTo(featureLayer.fullExtent); So, I'm looking into projecting the xmin... values from my state plane layers into web mercator and using them to set the view extent. I've constructed a point with state plane for the spatialReference, and checked it with webMercatorUtils.canProject(myPoint, map); but that returns false. So I'm presuming that the arcgis api just can't project from state plane to web mercator? Is there a list of projections that are functional? Alternatively, do I just need to give up on going in this direction and get all my ImageServer and MapServer data projected to web mercator to start with? Thanks!
... View more
05-24-2017
11:07 AM
|
0
|
2
|
1029
|
IDEA
|
This borders on a bug... I've been working with terrains that have a portion of nodes in a grid pattern. The points are two-dimensionally equidistant and ArcGIS (10.2) seems to use a randomization method for deciding which diagonal to triangulate across given a perfect square of points (2 dimensionally). Each time I build the terrain with the same points, different diagonals are chosen. I even have some evidence that triangulation was somehow re-randomized within a terrain that was not rebuilt (I just moved the geodatabase between drives). This results in an unpredictable surface model. But the points are not truly equidistant when considered in 3 dimensions (including z-values). Shouldn't terrain triangulation consider z-values to find the shortest diagonal?
... View more
07-13-2016
12:38 PM
|
1
|
0
|
570
|
IDEA
|
Terrains are a fantastic advance over the old TIN format... except a full set of tools and options are still needed! Please provide the full set of tools that are available for TIN data. Thanks! In particular, I really need an equivalent to the "TIN Edge" tool. I have a terrain that includes a set of points in one area with precise regular spacing. When points form perfect squares, the Terrain seems to use some sort of random selection to choose which diagonal to use for a triangulation edge. Exporting to TIN results in *different* diagonals used as edges, thus I cannot export to TIN and run the TIN Edge tool... I get different edges. There appears to be no possible way to get these terrain facet edges without substantial scripting to decipher them.
... View more
06-23-2016
10:25 AM
|
1
|
0
|
443
|
IDEA
|
Terrain datasets are a fantastic advance over the old TIN format... except a full set of tools and options are still needed! Please provide options for constrained vs. unconstrained delaunay triangulation. Thanks!
... View more
06-23-2016
10:16 AM
|
2
|
0
|
608
|
POST
|
"Add XY Coordinates" did the trick! I'm at version 9.3.1 - looking forward to 10. My shape field reports "Point ZM". The file originated as a CSV with XYZ values, turned into a shape file with "ASCII 3D to Feature Class". My code may remain a mystery, but the overall problem is solved. Thanks!
... View more
09-13-2010
03:08 PM
|
0
|
5
|
2224
|
POST
|
This should be really simple and I'm surprized that an hour of looking through the forums and other support hasn't turned up an answer for me yet. Am I just being blind? I have a shapefile of 3D points, and I want to fill a field in the attribute table with the Z values. Calculate Geometry does not offer Z coordinate options. So I've tried using the Field Calculator with [INDENT]Dim Output As Double Dim pPoint As IPoint Dim pZAware as IZAware Set pPoint = [Shape] Set pZAware = pPoint pZAware.ZAware = true Output = pPoint.Z [/INDENT] (and variants thereof) But all I get for output is the value '1'
... View more
09-13-2010
11:47 AM
|
0
|
15
|
21360
|
Title | Kudos | Posted |
---|---|---|
2 | 05-30-2017 12:03 PM | |
1 | 07-13-2016 12:38 PM | |
1 | 06-23-2016 10:25 AM | |
2 | 06-23-2016 10:16 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|