javascript - Adding ruler in leaflet and toggling grids on map -


is there way add ruler map ? requirment add ruler on map. along x , y axis.

http://www.cap-ny153.org/a%20utm%209.gif

i using leaflet creat floorplan application , need ruler , grid on map.

also ,i used simplegraticule draw grid on floormap. need toggle button or control switch on or switch off grids , rulers on map.

please suggest if possible in leaflet draw ruler on map , providing toggle switch on , off.

since simplegraticule extends l.layergroup(https://github.com/ablakey/leaflet.simplegraticule/blob/master/l.simplegraticule.js#l6), have option of adding standard overlay layer leaflet's layer control...which provides simple checkbox toggling overlays on , off.looks like

var sg = l.simplegraticule(options); sg.addto(map); var overlaymaps = {"graticule": sg}; l.control.layers(null, overlaymaps).addto(map); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -