New answers tagged

1

Altough I wasn't able to find a bug in the above code... I managed to work it around using another way to load GeoJSON based layers. Another thing, the lat and longs weren't properly ordered in the example given (so that the correspond to positions on Rosario, Argentina)... Below are written correctly. <!DOCTYPE html> <html> <head> ...


2

If you've published a Feature Service, you should be able to use the AddFeatures operation in the REST API.


1

Here is the final code which works. <!DOCTYPE html> <html> <head> <script type="text/javascript"> function getURL(val){ base = 'http://www.arcgis.com/apps/webappviewer/index.html?find='; uri=base +val; //location2 = encodeURI(uri); window.open(uri); } </script>


1

If I understand correctly you have a form in your HTML page wichs method is GET and when you submit the form you get your url not encoded correctly. If you don't provide code we can't see what could be the causes to your specific problem. But there's no need to let the form make the request. You can listen to the form submit event (If you're using jquery it ...


1

The geojson layer is in EPSG:4326, not 3857. For the center_coord, you should reproject the degree values to EPSG:900913: new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());


0

This looks like a projection issue. Your GeoJSON is showing units in degrees longitude and latitude: {"type":"MultiPoint", "coordinates":[[-33.015055,-60.655964],[-32.940781,-60.636731],[-32.917201,-60.683852]] }; The default GeoJSON CRS is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of ...


1

This is a very simple way to do what you need: https://output.jsbin.com/gijokewena You just define an array or object of layers with url and renderer (if it's needed) and then a function that load one of the layers using an id or key. I hope this help you.


1

If you want to perform a simple action, you can just use the onclick attribute, like this: .bindPopup( "<button id='clickHere' onclick='alert(...)'> <strong> stuff </strong> </button>" )) An other, slightly more difficult way to do this would be to catch the popupopen event and bind an action to the onclick event inside it: ...



Top 50 recent answers are included