Esri / esri-leaflet

A lightweight set of tools for working with ArcGIS services in Leaflet. :rocket:
https://developers.arcgis.com/esri-leaflet/
Apache License 2.0
1.6k stars 798 forks source link

Spatial reference 3006 Sweref doesn't seem to work as feature layer. #228

Closed Lunkster closed 10 years ago

Lunkster commented 10 years ago

After some testing I don't succeed to get layers from eg. http://ext-geoservices.lansstyrelsen.se/ArcGIS/rest/services/Vektor/LSTF/MapServer to show. The service is in ESPG:3006 (SWEREF 99 TM). Should this work or is there something I am missing?

patrickarlt commented 10 years ago

Are you sure the service is working properly? I can't seem to get your service to render with the ArcGIS JavaScript API or ArcGIS Online.

Could you also post some simple code and a screenshot of what the expected output is?

Lunkster commented 10 years ago

Hi again The service is used in http://ext-webbgis.lansstyrelsen.se/jonkoping/webbkarta/ Another layer from the same service is used for example here: http://meandernatur.se/skyddsvardatrad using leaflet vector layers. Cheers Henrik Den 20 mar 2014 16:09 skrev "Patrick Arlt" notifications@github.com:

Are you sure the service is working properly? I can't seem to get your service to render with the ArcGIS JavaScript API or ArcGIS Online.

Could you also post some simple code and a screenshot of what the expected output is?

— Reply to this email directly or view it on GitHubhttps://github.com/Esri/esri-leaflet/issues/228#issuecomment-38178418 .

patrickarlt commented 10 years ago

I emailed the ArcGIS JS API team about this and they pointed out the all the layers in your service are disabled by default. This means that you will need to explicitly make sure they are shown by using the layers option like so.

var layer = new L.esri.DynamicMapLayer("http://ext-geoservices.lansstyrelsen.se/ArcGIS/rest/services/Vektor/LSTF/MapServer/", {
  layers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] // require all these layers.
}).addTo(map);

Can you confirm this works?

Lunkster commented 10 years ago

It does work. Sorry for the late response.