Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-2311

leaflet.js polyline not working in %angular

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.7.0
    • None
    • Interpreters
    • None

    Description

      %angular

      <title>Simple Leaflet Map</title>
      <meta charset="utf-8" />
      <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />

      <div id="map2" style="height: 800px; width: 100%"></div>

      <script
      src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js">
      </script>

      <script type="text/javascript">
      var map2 = L.map('map2').setView([-41.2858, 174.78682], 14);

      L.tileLayer('http://

      {s}

      .tile.openstreetmap.org/

      {z}

      /

      {x}

      /

      {y}

      .png',

      { attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors', maxZoom: 24, minZoom: 3 }

      ).addTo(map2);

      var polyline = L.polyline([
      [-41.286, 174.796],
      [-41.281, 174.786],
      [-41.279, 174.776],
      [-41.290, 174.775],
      [-41.292, 174.788]
      ],

      { color: 'red', weight: 10, opacity: .7, dashArray: '20,15', lineJoin: 'round' }

      ).addTo(map2);

      </script>

      The map will be displayed but there is no polyline. When using this code in html context without zeppelin everything works fine.

      Hint:
      leaflet.js markers works fine and are visible.

      Attachments

        1. leaflet.html
          1 kB
          Uwe Zenker
        2. screenshot-localhost-8080-2017-04-02-02-08-27.png
          257 kB
          Sravan S

        Activity

          People

            Unassigned Unassigned
            waras2017 Uwe Zenker
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: