Active
Project:
Content Construction Kit (CCK)
Version:
6.x-2.8
Component:
Usability
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2010 at 19:48 UTC
Updated:
14 Dec 2010 at 16:55 UTC
Hi
I have a cck text field for "address"
Is there any way I can add a code somewhere (Maybe Views?) that would say "Map it". All I want it to do is take whatever is in the address cck field and open it in a new page on a google map.
So, When the link "Map It" is clicked, it would open http://maps.google.com with the cck fields input mapped.
----------------------
Id like to have this available as an alternative to the GMAP mod.
Thanks,
Chris
Comments
Comment #1
muhammadweb commentedHi Chris,
I prefer gmap and location module for Google map configurations..
These module provides the location and map views..
Regards
Muhammad
Comment #2
glitz commentedi have tried to install this but was unable to make it work without the user having to enter a longitude and latitude coordinates.
Ill have to reattempt this module.
Thanks
Comment #3
muhammadweb commentedHi Chris,
Add the following code to your custom module with passing city name.It will converts a place to Latitude and Longitude.
function get_lat_long(CITY-NAME){
$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='CITY-NAME'&sensor=false');
$output= json_decode($geocode);
$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;
return array($lat, $long);
}
References:
http://code.google.com/apis/maps/documentation/geocoding/index.html
http://amiworks.co.in/talk/how-to-get-latitudelongitude-from-an-address-...
Regards
Muhammad
Unimity solutions
Comment #4
glitz commentedok thanks i will try this today