Loading...
 

Geolocation


Starting at version 9, tiki allows the geolocation of wiki pages, blog posts, articles and tracker items, using OpenStreetMaps. Since version 20.1 new tile providers can be used, and clustering of mapped features is possible.

Click to expand
Click to expand

Admin panel

Options shown in Settings section

  • Available tile layers on maps:
    • Valid options are: openstreetmap, openaerialmap, google_street, google_satellite, google_physical, google_hybrid, blank
  • Google Street View
  • Google Street View Overlay
  • Geolocate blog posts
  • Geolocate wiki pages
  • Geolocate articles
  • Plugin Map
  • Location
  • Always load OpenLayers
  • Google Maps API Key


Options shown in MapServer settings

  • MapServer

1.1. Requirements

In order to have this feature properly working, you are encouraged to enable the following:

For tiki versions older than 14.0:

  • Admin home > Textarea > Plugins > Plugin Map (to enable the plugin to show the map with geolocated data)
  • Admin home > Textarea > Plugins > Plugin List (to select some subset of objects to be displayed in the map, instead of all)
  • Admin home > Maps > Always load OpenLayers enabled (for the "search location feature to work).


For tiki 14.0 and newer:

  • Quick Administration > Control Panels > Plugin Map
  • Quick Administration > Control Panels > Always load OpenLayers

(Make sure that the Preference Filter is set to advanced and/or experimental)

1.2. Geolocate wiki pages


Enable the feature in Admin home > Wiki > Features > Geolocation of wiki pages
And ensure that you have the option Admin home > Maps > Always load OpenLayers enabled for the "search location feature to work.

Then edit some Wiki pages (1), go to the properties tab (2), and place a marker for the position in the map you want to set for each page. You can click at "Search location" (3), add some address (4) and click at OK (5):

Click to expand
Click to expand


Once the location is found (without page reload), the map will be updated with the new location in the middle. You can save the page to keep the new location associated with the wiki page:

Click to expand
Click to expand


If you want that wiki page to show a map with that geolocation shown, add a call to the plugin map in the page:

Copy to clipboard
{map}


If you want to display all wiki pages that contain geolocation data, and with a different marker from the one shown for the wiki page where the map is shown, you can place this code inside the wiki page:

Copy to clipboard
{map} {LIST()} {filter type="wiki page"} {filter content="y" field=geo_located} {LIST}


The wiki page will show this type of map:

Click to expand
Click to expand


In case you want to show only the item corresponding to this wiki page, you can use this code instead:

Copy to clipboard
{map} {LIST()} {filter type="wiki page"} {filter content="Geolocation" field=object_id} {filter content="y" field=geo_located} {LIST}


In some case you may have some items with a map location set and some items without.
Those without will display a map and you may prefer this not to happen.
You can hide the field using a Javascript plugin and some code on the page:

hide location field when location is not set
Copy to clipboard
{JQ()} var map = $('input[name="location"]').val(); if (map == "0,0,2") { $('#openlayers1').hide(); } {JQ}


For more options to filter which content to be shown in the map, see PluginList

1.3. Geolocate blog posts or articles

You must enable the setting in "Admin home > Maps", and this will show a new field in the blog or article edit screen in which you will be able to indicate the position associated with that publication.

Later on, you can display a map displaying only those geolocated items, or in conjunction with other geolocated items in your site.

See profile "Easy GeoBlog" as a working example.



1.4. Geolocate tracker items

Simple example:

Copy to clipboard
{MAP(scope="center" controls="controls,search_location,scale,navigation" width="800" height="400" center="2.1421963549255145,41.381029526482095,7")} {searchlayer geo_located="y" maxRecords=100 tracker_id="1" type="trackeritem"} {MAP}


See some more advanced examples in the page PluginMap


Related:

Alias names for this page

Geolocation of wiki pages | Geolocalization | Geolocate | GIS

List Slides