Demonstration of how to embed an OpenStreetMap map

After inserting

<script type="text/javascript" src="https://osm.quelltextlich.at/OSMTools.js"></script>

in the <head> section of the HTML-file, you can add a map by stating

<script type="text/javascript">
  at.quelltextlich.osm.embedMapMarkedLocation( 47.07655, 15.43683, 11, 500, 300 );
</script>

at the desired position:

47.07655 specifies the latitude, 15.43683 denotes the longitude. 11 is used as initial zoom level, 500 denotes the map's width in pixel, and 300 its width in pixel.


As can be seen by following example, it's of course possible to add more than just a single map to a page:

This plain map without marking has been added by

<script type="text/javascript">
  at.quelltextlich.osm.embedMapPlain( 48.2083, 16.3730, 14, 400, 200 );
</script>

. 48.2083 specifies the latitude, 16.3730 denotes the longitude. 14 is used as initial zoom level, 400 denotes the map's width in pixel, and 200 its width in pixel.


The following map is 550 by 300 pixel and illustrates how to the KML-file https://osm.quelltextlich.at/demo/demo.kml as overlay to the map. The map is add via

<script type="text/javascript">
  at.quelltextlich.osm.embedMapKML( 'https://osm.quelltextlich.at/demo/demo.kml', 550, 300 );
</script>