简体   繁体   中英

Leaflet overlay does not appear, but no Javascript Console errors

I am new to Leaflet. Right now, I am trying to incorporate an overlay into a Google map using Leaflet 1.3.1.

Here is the html code:

<script src="https://unpkg.com/esri-leaflet@2.5.0/dist/esri-leaflet.js"
integrity="sha512-ucw7Grpc+iEQZa711gcjgMBnmd9qju1CICsRaryvX7HJklK0pGl/prxKvtHwpgm5ZHdvAil7YPxI1oWPOWK3UQ=="
crossorigin=""></script>

Here is the Javascript code:

   var mymap = L.map('mapid', {
  zoomControl: false

  });


 L.esri.dynamicMapLayer({
    url: "https://earthquake.usgs.gov/arcgis/rest/services/haz/hazfaults2014/",
opacity: 1,
}).addTo(mymap);

There are no console errors but nothing is showing up and I am not sure what I am doing wrong.

So I ended needing to use a tiled map layer on that url rather than a dynamic map layer. Thanks!

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.

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