question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic Map Layers won't load unless visible

See original GitHub issue
  • Browser and version: IE11, Chrome

  • Version of Leaflet (L.version): 1.0.2

  • Version of esri Leaflet (L.esri.VERSION): 2.0.6

Steps to reproduce the error: Load my sample project

What happens is a null errror on map shows up…

I was expecting it to load properly.

<html>
<head>
  <meta charset=utf-8 />
  <title>Esri Leaflet Quickstart</title>
  <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />

  <!-- Load Leaflet from CDN-->
  <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.2/dist/leaflet.css" />
  <script src="https://unpkg.com/leaflet@1.0.2/dist/leaflet-src.js"></script>

  <!-- Load Esri Leaflet from CDN -->
  <script src="https://unpkg.com/esri-leaflet@2.0.6"></script>

  <style>
    body { margin:0; padding:0; }
    #map { position: absolute; top:0; bottom:0; right:0; left:0; }
  </style>
</head>
<body>

<div id="map"></div>

<script>
  var map = L.map("map").setView([37.75, -122.23], 10);
  var street = L.esri.basemapLayer("Streets");
  street.options.minZoom = 0;
  street.options.maxZoom = 5;
  street.addTo(map);
  
  var topo = L.esri.basemapLayer("Topographic");
  topo.options.minZoom = 6;
  topo.options.maxZoom = 10;
  topo.addTo(map);
  
  L.esri.dynamicMapLayer({
    url: 'https://services.arcgisonline.com/arcgis/rest/services/Specialty/Soil_Survey_Map/MapServer',
    opacity: 0.7,
	minZoom: 6,
	maxZoom: 10
  }).addTo(map);
  
</script>

</body>
</html>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
jordanparfittcommented, Jan 23, 2017

I think I just did… Did that work?

1reaction
jordanparfittcommented, Nov 22, 2021

Now that I’m looking there isn’t a dist folder anymore. Is that an error?

On Mon, Jan 9, 2017 at 3:49 PM, Jordan Parfitt <> wrote:

My colleague asked me to delete my whole branch then check in again which worked. I think we are good.

thanks!

On Mon, Jan 9, 2017 at 3:23 PM, Jordan Parfitt jordanparfitt@gmail.com wrote:

It won’t let me commit to my git now…

I’m not 100% sure if this is on your end. I’m using Node 5.9.1 and npm 4.0.5

esri-leaflet@2.0.7 precommit D:\projects\markup-app\src\Mar kup\lib\esri-leaflet npm run lint

esri-leaflet@2.0.7 lint D:\projects\markup-app\src\Mar kup\lib\esri-leaflet semistandard | snazzy

‘semistandard’ is not recognized as an internal or external command,

operable program or batch file.

npm ERR! Windows_NT 6.1.7601 npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Users\jparfitt\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “run” “lint” npm ERR! node v5.9.1 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE npm ERR! esri-leaflet@2.0.7 lint: semistandard | snazzy npm ERR! Exit status 255 npm ERR! npm ERR! Failed at the esri-leaflet@2.0.7 lint script ‘semistandard | snazzy’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the esri-leaflet package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! semistandard | snazzy npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs esri-leaflet npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls esri-leaflet npm ERR! There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request: npm ERR! D:\projects\markup-app\src\Markup\lib\esri-leaflet\npm-debug .log

npm ERR! Windows_NT 6.1.7601 npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “precommit” npm ERR! node v5.9.1 npm ERR! npm v3.7.3 npm ERR! code ELIFECYCLE npm ERR! esri-leaflet@2.0.7 precommit: npm run lint npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the esri-leaflet@2.0.7 precommit script ‘npm run lint’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the esri-leaflet package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run lint npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs esri-leaflet npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls esri-leaflet npm ERR! There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request: npm ERR! D:\projects\markup-app\src\Markup\lib\esri-leaflet\npm-debug .log

husky - pre-commit hook failed (add --no-verify to bypass)

On Mon, Jan 9, 2017 at 12:23 PM, john gravois notifications@github.com wrote:

yuck. i thought it was a mistake that they were missing previously!

my hunch is that the changes causes errors because the new items don’t have bower.json files of their own. since at the end of the day bower fetches a pre-built tag of esri-leaflet that has already wrapped those dependencies internally (using rollup) i went ahead and removed them again (in d984b7a https://github.com/Esri/esri-leaflet/commit/d984b7a15c551f0b47527864acca0cc8e88eca83) and retagged v2.0.7 on github.

can you clear your bower cache and confirm whether or not that resolves the problem on your end?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/esri-leaflet/issues/910#issuecomment-271381109, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLNpjvc6mfxELQ10PAnKs5yJET2rj5Bks5rQokqgaJpZM4Lb5yq .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Only Show Features Visible in the Map Extent Not W...
Hello, I'm creating maps with a few layers that are Map Servers. ... "Only Show Features Visible in the Map Extent" doesn't appear...
Read more >
Dynamic map layers - Mapsly Help Center
A dynamic map layer is an object's sublayer grouping records that match the layer's criteria defined using Mapsly's visual formula builder.
Read more >
Troubleshoot—ArcGIS Online Help | Documentation
I can't reorder a layer in the map's contents. My web map contains a layer that is no longer available, and an error...
Read more >
Working with Dynamic Map Services in the ArcGIS API for ...
Learn how to harness the capabilities of ArcGIS Enterprise dynamic map services using the ArcGIS API for JavaScript version 4.x.
Read more >
Explore Interactive Map - PLACES - CDC
Data displayed on the map will change depending on the zoom level. Having the legend open as you zoom in/out will indicate what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found