简体   繁体   English

如何在传单地图中显示ArcGIS Server TileLayer

[英]How to show ArcGIS Server TileLayer within a Leaflet map

I am trying to show a map that I published using ArcGIS Server within a Leaflet map. 我正在尝试在传单地图中显示使用ArcGIS Server发布的地图。 I first tried to show the map as a basemap and creating a simple Leaflet TileLayer: 我首先尝试将地图显示为底图,并创建一个简单的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: 然后,我尝试使用Leaflet ESRI插件:

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); 看起来您的服务在WGS84(EPSG 4326)中; it must be in Web Mercator (EPSG 3857) to show up in Leaflet. 必须在Web Mercator (EPSG 3857)中才能显示在Leaflet中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM