Plugin Author
hupe13
(@hupe13)
Do you mean you would like to get a tooltip on hover only?
Instead of showing the point label as a popup, I want to display it directly on the map.
Plugin Author
hupe13
(@hupe13)
This works with marker only:
[leaflet-marker lat=28.41 lng=-81.58 visible]Marker[/leaflet-marker]
For leaflet-geojson you can use [hover] to show a tooltip on hover. The content of the tooltip is the same as of popup.
Can I add the name of the point in the Geojson file?
Example
Plugin Author
hupe13
(@hupe13)
Of course. Do you have an example of one point in your geojson file?
Its property should look like this, see https://en.wikipedia.org/wiki/GeoJSON:
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": {
"prop0": "value0"
}
},
Then you can write:
[leaflet-geojson src="my.geojson"]{@prop0}[/leaflet-geojson]