Data Mappr

Shows different catalogue entries' longitude/latitude values as pins on a Google Map. Clicking on the pin shows the catalogue entry in a little box (as a link to the entry).

The names of the fields to take longitude/latitude from are configured inside block parameters.

Example:

Code

[block title="store locater" description="This is a Store Locater" latfield="Latitude" longfield="Longitude" catalogue="stores" width="100%" height="300px" zoom="6" latitude="24.2135" longitude="-1.4654"]main_google_map[/block]

If you use the field names of exactly "Latitude" and "Longitude" then you'll get a visual location selector when adding entries. Otherwise you'll need to manually enter the coordinates. A tool like Latitude and Longitude Finder moved to getLatLong.net can help you.

It is advisable to set the field options as decimal_points=6 for your latitude and longitude fields, otherwise there will not be enough precision.

Add at least 1 entry to your catalogue with the latitude and longitude fields filled in to see the block work.

When you add the block you see various block parameters to be filled in including:
  • title – The Name of the block which will appear on screen (for example, Store Locater)
  • description – a Description of the block
  • latfield – This is the field you chose in the catalogue which has all the latitude coordinates in it
  • longfield – This is the field you chose in the catalogue which has all the longitude coordinates in it
  • catalogue – This is the name of the catalogue you chose and want to display the pins for
  • width – Defaults to 100% of the column
  • height – Defaults to 300px but can be set to how ever many pixels(px) you need it to be
  • zoom – A number between 1 and 17, the higher the number the more zoomed in the map will start at
  • latitude – The Latitude coordinates where you want the centre of the map to be when first loaded
  • longitude – The Longitude coordinates where you want the centre of the map to be when first loaded

Coordinates of the Google map centre point and zoom level are configurable. You can find the coordinates by using the option in Google Maps Labs or via Latitude and Longitude Finder moved to getLatLong.net.

Images

Back to Top