Leaflet.CenterCross
Leaflet.CenterCross, a plugin that adds cross image on center to Leaflet powered maps.
Original program is developed by Geospatial Information Authority of Japan.
https://github.com/gsi-cyberjapan/gsimaps
Structure and build scripts are based Leaflet.draw.
https://github.com/Leaflet/Leaflet.draw
How to use
include javascript.
add follow code:
var control = Lcontrol;map;
Control.centerCross
CenterCross control provides toggle switch of center cross.
var control = Lcontrol;map;
Creation
Factory | Description |
---|---|
L.control.centerCross(<Control.CenterCross options> options?) | Create a center cross control. |
Options
Option | Type | Default | Description |
---|---|---|---|
position | String | 'topleft | See Control Positions |
toggleText | String | 'C' | control's text |
toggleTitle | String | 'Toggle Center Cross' | control's title, show on mouse over in control like tooltip |
show | Boolean | false | If true, show center cross when addControl |
centerCross
Used to put center cross object in center of the map.
var centerCross = L;map;
Creation
Factory | Description |
---|---|
L.centerCross(<CenterCross options> options?) | Creates a center cross object. |
Options
Option | Type | Default | Description |
---|---|---|---|
visible | Boolean | true | If true, adds center cross to the map. |
Methods
Method | Returns | Description |
---|---|---|
addTo(<Map > map) | this | Adds center cross to the map. |
getVisible() | Boolean | Reterns true if center cross shows in the map. |
setVisible(< Boolean > on) | this | Updates visible status |