deprecated and killed

In Tiki 7 we started to move from GoogleMaps (GMap) to OpenStreetMaps, respectively OpenLayers, which offers a GoogleMap layer. Latest since Tiki 13 we are using only OpenLayer (OpenStreetMap) and step b step remove(d) ll code from old MaServer and GMap.

Please visit the following pages, if you want to use Maps in Tiki:
OpenLayers, Maps, PluginMaps

Please mind: This page stays here only for historic reasons and to guide to Tiki's OpenLayers page

Google Map Details


There are some improvements made to Tiki to take advantage of Google Maps.

Geolocation of Tracker items

(for Tiki version 1.10)

Items in a tracker can be geolocated:

Image

Panoramio

Other similar features (which also Google Maps) could be introduced in your Tiki installation.

For instance, Panoramio, a photo-sharing community using Google Maps ("Discover the world through satellite photos" - http://www.panoramio.com).

Image


This kind of simple feature could included through creating and using those two files in your tiki installation:

tiki-panoramio.php
Copy to clipboard
<?php include 'tiki-setup.php'; $default_lon = '2.338'; $default_lat = '48.89'; $default_zoom = '3'; $default_kind = '2'; if (isset($_REQUEST['lon'])) { $lon = preg_replace('/[^0-9\.-]/','',$_REQUEST['lon']); } else { $lon = $default_lon; } if (isset($_REQUEST['lat'])) { $lat = preg_replace('/[^0-9\.-]/','',$_REQUEST['lat']); } else { $lat = $default_lat; } if (isset($_REQUEST['zoom'])) { $zoom = preg_replace('/[^0-9]/','',$_REQUEST['zoom']); } else { $zoom = $default_zoom; } if (isset($_REQUEST['kind'])) { $kind = preg_replace('/[^0-9]/','',$_REQUEST['kind']); } else { $kind = $default_kind; } $smarty->assign('lon',$lon); $smarty->assign('lat',$lat); $smarty->assign('zoom',$zoom); $smarty->assign('kind',$kind); $smarty->assign('mid','tiki-panoramio.tpl'); $smarty->display('tiki.tpl'); ?>

templates/tiki-panoramio.tpl
Copy to clipboard
<form> <input type="text" name="lat" value="{$lat}" size="8" /> <input type="text" name="lon" value="{$lon}" size="8" /> <input type="text" name="zoom" value="{$zoom}" size="2" /> <input type="text" name="kind" value="{$kind}" size="2" /> <input type="submit" name="act" value="{tr}send{/tr}" /> </form> <div>Map is grabbed with panoramio plugin.</div> <iframe src=http://www.panoramio.com/plugin.php?lt={$lat}&amp;ln={$lon}&amp;z={$zoom}&amp;k={$kind} width="100%" height="600px" border="0" style="border:0;"></iframe>

Technical details

This implementation uses v2 of the google map API, documented on http://www.google.com/apis/maps/documentation/reference.html

Related pages