{"action":"created","issue":{"url":"https://api.github.com/repos/Esri/esri-leaflet/issues/403","labels_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/403/comments","events_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/403/events","html_url":"https://github.com/Esri/esri-leaflet/issues/403","id":49841382,"number":403,"title":"Difficulty understanding Dynamic Map Layer, MapServer, FeatureServer","user":{"login":"buckleytom","id":98956,"avatar_url":"https://avatars.githubusercontent.com/u/98956?v=3","gravatar_id":"","url":"https://api.github.com/users/buckleytom","html_url":"https://github.com/buckleytom","followers_url":"https://api.github.com/users/buckleytom/followers","following_url":"https://api.github.com/users/buckleytom/following{/other_user}","gists_url":"https://api.github.com/users/buckleytom/gists{/gist_id}","starred_url":"https://api.github.com/users/buckleytom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buckleytom/subscriptions","organizations_url":"https://api.github.com/users/buckleytom/orgs","repos_url":"https://api.github.com/users/buckleytom/repos","events_url":"https://api.github.com/users/buckleytom/events{/privacy}","received_events_url":"https://api.github.com/users/buckleytom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Esri/esri-leaflet/labels/FAQ","name":"FAQ","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-11-23T22:09:12Z","updated_at":"2015-10-13T16:59:44Z","closed_at":"2015-01-06T20:23:06Z","body":"Hello, \r\n\r\nI was trying to follow this example: \r\n\r\nhttp://esri.github.io/esri-leaflet/examples/spatial-queries.html\r\n\r\nWith the following MapServer layer:\r\n\r\nhttp://maps2.dcgis.dc.gov/dcgis/rest/services/DCGIS_DATA/Environment/MapServer/23/\r\n\r\nI became confused about whether I should use the DynamicMapLayer or FeatureServer classes from leaflet-js, partially because of the inconsistencies in their naming. That is, an ArcGIS Rest endpoint uses the endpoint /FeatureServer, and so does leaflet-js. However, leaflet-js does not seem to have a L.esri.mapServer class. \r\n\r\nThis meant that I just went back to using Terraformer. In any case, these tools are pretty great overall.  "},"comment":{"url":"https://api.github.com/repos/Esri/esri-leaflet/issues/comments/147777883","html_url":"https://github.com/Esri/esri-leaflet/issues/403#issuecomment-147777883","issue_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/403","id":147777883,"user":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T16:59:44Z","updated_at":"2015-10-13T16:59:44Z","body":"just to clarify/reiterate, the `dynamicMapLayer` constructor expects a url that ends in '/[yourservice]/MapServer/` and asks the server to draw a raster image on the fly, displaying multiple layers at once.  (check out the example [here](http://esri.github.io/esri-leaflet/examples/dynamic-map-layer-reprojected.html)).\r\n\r\nthe `featureLayer` constructor expects a url that ends in a number (like 'MapServer/3' or 'FeatureServer/0') and asks the server for JSON so that a graphic can be drawn on the client.\r\n\r\nconfusingly, the dynamic map service url @buckleytom provided in the first comment in this thread was published with all the individual layers 'not visible' by default.  you can open this [arcgis.com webmap](http://www.arcgis.com/home/webmap/viewer.html?url=http%3A%2F%2Fmaps2.dcgis.dc.gov%2Fdcgis%2Frest%2Fservices%2FDCGIS_DATA%2FEnvironment%2FMapServer%2F), click the `content` tab and expand the `environment` layer to see what i mean.\r\n\r\nthis doesn't mean its not possible to draw the layers, but you'd have to provide an array of `layers` in the [constructor](http://esri.github.io/esri-leaflet/api-reference/layers/dynamic-map-layer.html) to override the default behavior.\r\n"}}