Skip to content

akuechl/osm_akuechler

Repository files navigation

osm_akuechler Build Status Codacy Badge

A Joomla Plugin for Joomla 2.5 and 3.x to show an Openstreetmap map. The plugin use the Leaflet javascript library.

  1. Joomla
  2. Open Street Map
  3. Leaflet

The advantage of OpenStreetMap is that no license fees such as Google maps (see here) are necessary. OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. (see Wikipedia)

Example

An example can be found here.

Usage

Write in one line, i.e.

<div class="osm-map" data-lat="51.047382" data-lon="13.734087" data-zoom="17">
  <div class="osm-point" data-lat="51.047382" data-lon="13.734087">
    <h3>
    	Spielplatz in der Innenstadt von Dresden.
  	</h3>
  </div>
  <div class="osm-point" data-lat="51.0466" data-lon="13.733087">
    <h3>
    	Parkplatz.
  	</h3>
    <p>
      Hier könnt ihr parken.
    </p>
  </div>
</div>
Name  Description
osm-map  DIV tag with the card data.
osm-point  DIV tag with a points, you can add lots of points. Included HTML text is for marker popup.
data-lat  Coordinate, Latitude
data-lon  Coordinate, Longitude
data-zoom  Zoom factor, depends on tiles server, between 1 and 18.
height  The height of DIV is the height of the card. Set the height via CSS, default is 400px.

CHANGELOG

see CHANGELOG.md

License

You can choose: MIT License or GPL-3.0

Leaflet is provided with the BSD 2-Clause License.

Configuration

No idea? Use the default value.

You can configurate the tile server URL. A tile server provides up to date map images. The default value is http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png. Another tile server is i.e. the Wikipedia tile server in Germany: http://{s}.www.toolserver.org/tiles/germany/{z}/{x}/{y}.png. Or you can choose you own tile server. See OpenStreetMap Wiki here and here. The describtion of the placeholders {s}, {x}, {y}, {z} can you find in the Leaflet documentation.

You can choose that the leaflet library is loaded not from your server but from Cloudflares CdnJS. This CDN (see Wikipedia) can rise the perfomance of your page and can reduce your webservers load.