POST
|
You da real MVP Thomas. Thank you so much for your help. Do you have a donate button somewhere so I can buy you a beer/coffee?
... View more
03-10-2017
07:56 AM
|
0
|
1
|
983
|
POST
|
Thank you so much for your help. I checked the spatial reference as suggested, the spatialReference._info.wkTemplate property is: PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",${Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]] I don't know what that means exactly but it appears to me that your guess about it being web mercator is correct, right? Given this info, which method on the webMercatorUtils object would be required to convert the coordinates/path/geometry to degrees (lat/lng)? I tried all of them but most returned undefined. If you can tell me which one is correct it will help in debugging.
... View more
03-10-2017
07:35 AM
|
0
|
3
|
983
|
POST
|
I'm drawing a bunch of carrier routes from the USPS API to an ArcGIS map. I need to only show the routes that are within a certain distance from a certain point. I have the latitude and longitude for the center point. I thought the paths used by Polyline were made up of latitude and longitude sets multiplied by 100000, and I tried using them as such but that didn't work. The paths are generated from point sets that look like this: -9214713, 3256075. When divided by 100000 they look like longitude and latitude, but I guess they're not. What are these coordinates used in the Path parameter of the Polyline class, and how can I convert them to lat and lng for the purpose of calculating distance?
... View more
03-09-2017
01:10 PM
|
0
|
5
|
1852
|
POST
|
I figured it out... var kmlUrl = "https://dl.dropboxusercontent.com/u/2142726/esrijs-samples/Wyoming.kml"; var kml = new KMLLayer(kmlUrl); map.addLayer(kml); kml.on("load", function() { var layers = kml.getLayers() layers[0].on("mouse-over", function () { alert("mousy bitch"); }); }); Turns out the KML layer is actually composed of FeatureLayers. The solution is to get the Feature Layers from the KMLLayer wi the `getLayers()` method.
... View more
10-31-2016
12:34 PM
|
0
|
0
|
351
|
POST
|
I am working on an ArcGIS map. I need to be able to interact with KML layers. Here is a minimal version of my current code: map = new Map("map", { basemap: "topo", center: [-108.663, 42.68], zoom: 6 }); parser.parse(); var kmlUrl = "https://dl.dropboxusercontent.com/u/2142726/esrijs-samples/Wyoming.kml"; var kml = new KMLLayer(kmlUrl); map.addLayer(kml); kml.on("load", function() { console.log("done"); }); [Here is a fiddle](https://plnkr.co/edit/vtB24sZbZGaeHCEsU1ch?p=preview) I'm looking to achieve something more like [this map](https://developers.arcgis.com/javascript/3/samples/fl_hover/), which outlines the layer on hover. (This example is from the [FeatureLayer](https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html) class, but my KML is dynamically generated. Is it possible to create a featurelayer dynamically from KML data?) How can I listen for mouseover on a KML shape?
... View more
10-31-2016
11:40 AM
|
0
|
1
|
661
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|