Shareloc - the free and open map API based on OpenLayers (Version 0.9.0)

Idea and development by


The Shareloc object provides a namespace for all elements of Shareloc


Application for the GUI based creation of Shareloc permalinks.


The class holding the layer configuration object. Also offers functions to access the layer objects of Shareloc.

Loads the JSON configuration stored at conf/layers.json


This class represents the Shareloc map API.

It offers functions to create a customized OpenLayers map with a base layer by config as well as functions to add a marker and a popup to the map.


Creates an OpenLayers map object by the given configuration object and renders it to a DIV with the ID 'map' in the DOM.

Configuration must be in the format:

    X: 8.318049976895958,
    Y: 49.43451657605041,
    zoom: 14,
    bgLayer: "opentopomap",
    marker: "49.43707328904662,8.306307792663572",
    popupText: "foo-popup-text"

parameter type description
config Object

the configuration object for the map


ol.Map :

the created OpenLayers map


Creates a marker feature on the map at the given position.

The position must be a comma separated String containing lat and lon, e. g. "49.43707328904662,8.306307792663572"

parameter type description
markerPosString String

the position where the marker is drawn


ol.Feature :

the created OpenLayers marker feature

markerPopup(markerFeat, popupText)

Creates a popup at the given feature's position

parameter type description
markerFeat ol.Feature

the marker feature to bin the popup to

popupText String

the text to be shown in the popup


The current version of Shareloc