Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var map = L.map('map', {
- 'center': [-3.74461, -38.5742],
- 'zoom': 15
- });
- var tileLayer = L.tileLayer('https://{s}.tiles.mapbox.com/v4/{mapId}/{z}/{x}/{y}.png?access_token={token}', {
- attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
- subdomains: ['a','b','c','d'],
- mapId: 'rakshak.l937n12c',
- token: 'pk.eyJ1IjoicmFrc2hhayIsImEiOiJ5cHhqeHlRIn0.Vi87VjI1cKbl1lhOn95Lpw'
- });
- tileLayer.addTo(map);
- var pointA = new L.LatLng(-3.74166, -38.53532);
- var pointB = new L.LatLng(-3.74461, -38.5742);
- var marker = L.marker(pointA).addTo(map);
- var pointList = [pointA, pointB];
- // map.center.setTo(pointB);
- var firstpolyline = new L.Polyline(pointList, {
- color: 'blue',
- weight: 3,
- opacity: 0.5,
- smoothFactor: 1
- });
- firstpolyline.addTo(map);
Advertisement
Add Comment
Please, Sign In to add comment