1) Download and install Google maps plugin from http://extensions.joomla.org/extensions/1147/details
2) Generate the API key for use the Google maps plugins in http://code.google.com/intl/gl/apis/maps/signup.html
3) Add the API key in the plugin configuration and activate the plugin
4) Open the file administrator/components/com_contact/contact_items.xml and after this line:
Code: Select all
<param name="allow_vcard" type="radio" default="0" label="vCard" description="Show/Hide VCard">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
Code: Select all
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="lat" type="text" defautl="" label="Latitud" description="Latitud en el mapa" />
<param name="lon" type="text" defautl="" label="Longitud" description="Longitud en el mapa" />
6) Open the copied file /templates/[your current template]/html/com_contact/contact/default_address.php and add to end of file the next piece of code:
Code: Select all
<?php
if ( $this->contact->params->get('lat')!='' && $this->contact->params->get('lon')!='' ) {
echo '<div class="mosmap">';
$mosmap = &JTable::getInstance('contact');
$mosmap->text="{mosmap lat='".$this->contact->params->get('lat')."'|lon='".$this->contact->params->get('lon')."'|height='200px'|width='100%'}";
$dispatcher =& JDispatcher::getInstance();
$params = & new JParameter('');
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onPrepareContent', array (& $mosmap, & $params, 0));
echo $mosmap->text;
echo '</div>';
}
?>