New answers tagged

1

I can parse the JSON text using JSON.parse. var obj = JSON.parse(jsonResp); service.log(obj.features[0].attributes.ZONE) Notes: The JSON features element is an array with a single element in it (note the square brackets). Put an index reference after features: features[0]. Credit goes to @Steven Kay. The field name is case sensitive. zone didn't work,...


1

You are looking at the WGS84/Pseudo-Mercator (EPSG: 3857) projection, which is used in several mapping applications and resembles the WGS84 Coordinate System. The main difference here is that the unit of the coordinates in the former is metre and degree in the latter. That is the reason you have different coordinates. It would be useful if you could shed ...


3

The JSON to Features tool won't work for your case. The tool wants either esri JSON or geoJSON. The JSON from that link is neither of those, it's straight up regular JSON. You'll need to find another parser to turn JSON into a shape/fgdb/geo-something. You could research using cursors and building your own featureclass by parsing the JSON manually. There ...


2

You need to define styles or pointToLayer function in L.geojson to create markers var geojsonMarkerOptions = { radius: 8, fillColor: "#ff7800", color: "#000", weight: 1, opacity: 1, fillOpacity: 0.8 }; $.getJSON("taiwan.json", function (data) { var datalayer = L.geoJson(data, { onEachFeature: function (feature, ...


2

You need to specify an output feature class. parcelsFC = os.path.join('temp.gdb',JsonDirectoryLocation) outFc = os.path.join ("temp.gdb", "JsonFeatures") arcpy.JSONToFeatures_conversion(parcelsFC, outFc)


0

Here is something similar : http://www.gistechsolutions.com/leaflet/DEMO/baseball/BaseballPanelSelect2.html The popups work as expected. If you select a distance (top right) and then click on the map, all points in that distance get selected and show up in the sidebar table. From here you can select on and it will zoom to that point. This was my way of not ...


1

If you run your map from server and would like show your local GeoJSON file on map, you will have to upload your file. Usual method for this is using FileReader() object (see for example https://stackoverflow.com/questions/3582671/how-to-open-a-local-disk-file-with-javascript). In your case I would recommend Leaflet plugin Leaflet.FileLayer, which can do ...


0

Since you are already using python, it would be easier to use folium library. Folium integrates python with leaflet.


Top 50 recent answers are included