I am trying to show a map that I published using ArcGIS Server within a Leaflet map. I first tried to show the map as a basemap and creating a simple Leaflet TileLayer:
var aLayerSix = L.tileLayer('http://seasnail.csun.edu/ArcGIS/rest/services/GIS/Campus_Base/MapServer/tile/{z}/{y}/{x}.png', {
attribution: 'Map Tile © CSUN Geography'
});
I couldn't get the map. Then I tried to use Leaflet ESRI plugin:
var aLayerSix = L.esri.tiledMapLayer("http://seasnail.csun.edu/ArcGIS/rest/services/GIS/Campus_Base/MapServer/");
Still I cannot get the Leaflet to show the map. Here is the center of the map:
var centerlatlng = L.latLng(34.238716626866484, -118.52985978131983);
Cheers,
Looks like your service is in WGS84 (EPSG 4326); it must be in Web Mercator (EPSG 3857) to show up in Leaflet.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.