AnsweredAssumed Answered

Open Street Map and Leaflet (L.tileLayer) ??

Question asked by 924216004 on Aug 5, 2015
Latest reply on Aug 6, 2015 by 924216004


Question: How do I link to Open Street Map (OSM)? Do I have to export the png file from Open Street? Do i have to reference it from OSM?


var startPoint = [34.227700, -84.250717];
var map ='map', {attributionControl: false, editInOSMControl: true, editInOSMControlOptions: {position: 'topleft'}}).setView(startPoint, 17),
    tilelayer = L.tileLayer("http://{s}{z}/{x}/{y}.png", {maxZoom: 20, legend: LEGEND, openLegendOnLoad: true, attribution:osmDataAttr}).addTo(map),
    hash = new L.Hash(map);
    legend = (new L.Control.TileLegend()).addTo(map);
    // legend = new L.TileLegend(map, tilelayer, L.DomUtil.get('leaflet-control-tilelegend-container'), LEGEND);