The free and open map API to create and share web maps based on OpenLayers.
Watch the online demo at https://apps.meggsimum.de/shareloc/
At the moment there are a few free map layers based on open data included in the online demo. But it is easily possible to include your own layers (e. g. WMS) in your Shareloc instance (see section Build and deploy your own Shareloc instance).
With Shareloc it is possible to create your OpenLayers web map without any coding. With the Shareloc web application you can
- configure your map view
- add a marker to point at a special place and
- optionally add a text in a bubble to your marker.
Afterwards you can share your map by a simple link or embed the map in your own website.
Shareloc offers an easy-to-use JavaScript API to create your own OpenLayers maps. Therefore you just have to include the Shareloc JavaScript lib into your HTML page. Now with a few lines of code it is possible to create a customized OpenLayers map.
var api = new Shareloc.MapApi();
var params = {
// lon of map center
X: 8.318049976895958,
// lat of map center
Y: 49.43451657605041,
// initial map zoom level
zoom: 14,
// layer
bgLayer: "osm.base"
};
// create and return your ol3 map instance
var olMap = api.map(params);Check out the API docs to see all possibilities Shareloc offers.
- Clone this repository
- npm and grunt need to be installed on your system
npm installgrunt build- Copy the
buildfolder to your webserver - Optonally you can edit the
build/conf/layers.jsonfile to add your own layers to Shareloc - That's it
- Fork and clone this repository
- npm and grunt need to be installed on your system
- Run
npm installon command line - Run
grunton command line - Open
http://localhost:7000/orhttp://localhost:7000/share.htmlin your browser to see the development version of Shareloc - In case you changed the HTML templates under
tpl/please restart the server with the commandsCTRL + Candgrunt
Any kind of contribution is warmly welcome:
- Documentation
- Bug reporting
- Bug fixes
- Code enhancements
Thanks to all map providers, who grant free access to their maps, which are used in the online demo:
You need more information or support? Please contact us at
info__(at)__meggsimum__(dot)__de

