Menu
Close

Dashed Polyline

Sample Implementation

    
      
      <html>
        <head>
          <title>Dashed Polyline</title>
          <meta name="viewport" content="initial-scale=1.0">
          <meta charset="utf-8">
          <style>
          html,
          body,
          #map {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100vh;
          }
          </style>
             <script src="https://apis.mappls.com/advancedmaps/api/<Token>/map_sdk?layer=vector&v=3.0&callback=initMap1" defer async></script>
            </head>
        <body>
                    <div id="map"></div>
                        <script>
        var map;

        function initMap1() {
            map = new mappls.Map('map', {
                center: [28.544, 77.5454],
                zoomControl: true,
                location: true
            });
            map.addListener('load', function() {
                var mixjson = {
                    "type": "FeatureCollection",
                    "features": [{
                            "type": "Feature",
                            "geometry": {
                                "type": "LineString",
                                "coordinates": [
                                    [28.551042, 77.268953],
                                    [28.551005, 77.268649],
                                    [28.550986, 77.268392],
                                    [28.550967, 77.268231],
                                    [28.550967, 77.268177],
                                    [28.550958, 77.268016],
                                    [28.55092, 77.267587]
                                ]
                            },
                            "properties": {
                                "name": "Direction1",
                                "description": "Direction2",
                                "stroke-opacity": 0.6509803921568628,
                                "stroke-width": 4
                            }
                        },
                        {
                            "type": "Feature",
                            "geometry": {
                                "type": "LineString",
                                "coordinates": [
                                    [28.55092, 77.267587],
                                    [28.550722, 77.267651],
                                    [28.55042, 77.267823],
                                    [28.550128, 77.267802],
                                    [28.549751, 77.267995],
                                    [28.549652, 77.268039]
                                ]
                            },
                            "properties": {
                                "stroke-opacity": 0.6509803921568628,
                                "stroke-width": 4
                            }
                        }
                    ]
                };
                var jsonData = mappls.addGeoJson({
                    map: map,
                    data: mixjson,
                    fitbounds: true,
                    dasharray: [1.5, 1.5]
                });
            });
        }
    </script>
        </body>
      </html>
      
      
      
    
  
Call at Mappls
Product release

Personalisation SDK, by Mappls, is India's first O2O engagement tool that can 3X your customer engagement, retention and conversion.

Boost your businesses with Mappls’ industry-leading optimisation APIs and SDKs to bring the best and most efficient ways to deliver goods, save time and increase profits.

or