Skip to content

Commit 3145480

Browse files
committed
Merge pull request #24 from mb1248/scale
Adding a scale to the map
2 parents 01ce2eb + f911f62 commit 3145480

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

osmmap2.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@
360360
TileLayer = new L.TileLayer(Url, {maxZoom: 18, noWrap: ".$nowarp.", attribution: Attribution}),
361361
latlng = new L.LatLng(".$center_lat.", ".$center_lng.");\n";
362362
$js .= "var map = new L.Map('map', {center: latlng, zoom: ".$zoom.", layers: [TileLayer], contextmenu: true});\n";
363+
$js .= "L.control.scale().addTo(map);\n";
363364
$js .= "map.attributionControl.setPrefix('');\n";
364365
$js .= "var MarkerClusterList=[];\n";
365366
$js .= "var markers = new L.MarkerClusterGroup();\n";

0 commit comments

Comments
 (0)