ownMaps Documentation

For a ready to use quick installation please refer to Quickstart.



Download latest release, unpack ZIP-file and copy the folder ownmaps with its subfolders d and i anywhere into your website.



You have to set a global var called $_ownmaps_app with the absolute path to the ownmaps library folder.

The following code assumes that you store the library in a directory called ownmaps in your website root.

$_ownmaps_app = "ownmaps/";

Optionally you can define the following vars for the absolute paths to maps and geo data as well as the absolute path for the used icons.

The following code assumes that you store the data and icons in the standard subfolders called d and i.

$_ownmaps_dat = $_ownmaps_app."d/";
$_ownmaps_ico = $_ownmaps_app."i/";

This vars will be used in this documentation when creating maps. Otherwise you have to define the paths when creating the maps.

Include the ownMaps configuration file at the end of the html head section of your PHP script.

include( $_ownmaps_app."ownmaps.php" );


Create a Map

To create a map at any position of your page you have to fill in the following code into a div element with a certain id and height in the html body section of your PHP script:

fnOMcreateMap( API, $_ownmaps_dat, $_ownmaps_ico, MAP, GEO );

API : $OMgmaps for Google Maps or $OMleaflet for Leaflet OSM Maps. Others may be included or will follow.

MAP : Single map data filename without extension .map or "*" for all map data files - standard = ALL.

GEO : Single geo data filename without extension .json/.kml or "*" for all geo data files - standard = ALL.

A complete overview and documentation of all options for creating maps will follow soon.


Sample PHP file

$_ownmaps_app = "ownmaps/";
$_ownmaps_dat = $_ownmaps_app."d/";
$_ownmaps_ico = $_ownmaps_app."i/";

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>html, body { height: 100%; margin: 0px; padding: 0px }</style>

<?php include( $_ownmaps_app."ownmaps.php" ); ?>


<div id="map_id" style="height:400px;">
<?php fnOMcreateMap( $OMleaflet, $_ownmaps_dat, $_ownmaps_ico, "map", "geo" ); ?>