Active
Project:
GMap Module
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 May 2010 at 09:50 UTC
Updated:
29 Jul 2011 at 23:08 UTC
Hi there
Thanks for a great module. I am using GMap array to embed my map within Drupal. When I click on the map, that marker shows up but what I ideally would like is to see the latitide and logitude in Decimal Degrees. Im assuming I have to create some sort of text field for latitude and Longitude and linking it to the Gmap. Any help will be appreciated. Thanks.
My code is as follows:
$mymap=array('id' => 'mymap',
'latitude' => '-26.19258642226091',
'longitude'=>' 30.17647933959961',
'zoom' => 5,
'width' => '600',
'height' => '400px',
'mtc' => 'standard',
'type' => 'map',
'behavior' => array(
'locpick' => TRUE,
'nodrag' => FALSE,
'nokeyboard' => TRUE,
'overview' => FALSE,
'scale' => TRUE,
),
'markers' => array(
array(
'text' => 'First Marker',
'markername' => 'small red',
)),
);
echo theme('gmap', array('#settings' => $mymap));
Comments
Comment #1
OpenSourcer commentedI figured it out. See below in case this helps anyone.
CODE:
Comment #2
afeijoThanks a lot! Your example solved my problem ;)
Comment #3
pjeutr commentedGreat example, any idea how to add a zoom textfield?
I could write my own js Drupal.gmap.getMap('gmap-loc1-gmap0').map.setZoom(5);
But this being drupal, there must be an easier way!