Geolocation Leaflet element

This Kontent custom element allows you to put a marker on a map and it automatically gets converted to latitude and longitude geo locations.

This element is based on Leaflet service that uses Open street maps together with the Mapbox service.

screenshot

Configuration

Your have to configure access_token parameter. Use access token containing public scopes. One is generated automatically after the sign up.

You can specify other {JSON} parameters as a part of the configuration to set the default width/height (pixels) of the map, default latitude and longitude and the zoom (0-18) of the map.You can configure only some or even none of the parameters, default values are defined in following example:

{
    "access_token" : "pk.eyJ1IjoieGhlcm1hbm4iLCJhIjoiY2p0aDB6cHRqMDU5NDRhcDV4YTlmbjh3MiJ9.RS9DeqsnIhaK46H4fQaxVg",
    "width": 800,
    "height": 600,
    "lat": 46.123456789,
    "lng": 16.123456789,
    "zoom": 10
}