Fullscreen
[Show/Hide Right Column]

Print
English

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
<?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
<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}&ln={$lon}&z={$zoom}&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


Contributors to this page: xavidp1213 points  .
Page last modified on Thursday 14 June, 2007 09:33:01 UTC by xavidp1213 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki