GithubHelp home page GithubHelp logo

Comments (3)

traderboy avatar traderboy commented on May 20, 2024

Here's an example to demonstrate the problem. I tried using leaflet-0.5.1, leaflet-0.6.1 and get the same problem. Open page, pan to the east, then turn on the fire overlay layer. The points are not aligned until you pan or zoom again. I'm using the esri-leaflet.js from the dist folder.

<!DOCTYPE html>
<html>
<head>
    <title>Leaflet Layers Control Example</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body, #map{width: 100%; height: 100%}
</style>
</head>
<body>
    <div id="map" ></div>
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
    <script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
    <script src="esri-leaflet.js"></script>
    <script>
        var baseLayer = L.esri.basemapLayer("Streets");
        var map = L.map('map', {
        center: [33.73, -120.99],
        zoom: 8,
        layers: [baseLayer]
        });
        var baseLayers = {
            "Street": baseLayer,
        };
        var fire = L.esri.dynamicMapLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer", {
          opacity : 0.7,
          layers: "0"
        });
        var overlays = {
            "Fire" : fire
        };
        L.control.layers(baseLayers, overlays).addTo(map);
    </script>
</body>
</html>

from esri-leaflet.

patrickarlt avatar patrickarlt commented on May 20, 2024

I'll work on fixing this. Thanks for the example code.

from esri-leaflet.

patrickarlt avatar patrickarlt commented on May 20, 2024

Closing this since it is fixed in #142.

from esri-leaflet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.