Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

GOOGLE MAP

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
jothirajan
Smarty Pro


Joined: 06 Feb 2009
Posts: 114
Location: India

PostPosted: Tue Mar 03, 2009 11:53 am    Post subject: GOOGLE MAP Reply with quote

Hello everyone ....

I want to get the GOOGLE MAP by the entered country/state/city/address/

not the latitude and longtitude...Can any one advice me...

Thanks
Joe
Back to top
View user's profile Send private message Send e-mail
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Mar 03, 2009 3:53 pm    Post subject: Reply with quote

There is a function for that in the GoogleMapsAPI class.
Back to top
View user's profile Send private message Visit poster's website
antoniog
Smarty Rookie


Joined: 01 Dec 2011
Posts: 12

PostPosted: Mon Dec 12, 2011 7:56 pm    Post subject: Google Core site Reply with quote

You must search documentation at Google Core site.
Then search Geolocation Utility, enter your street address and obtain your latitude and longitude.
Back to top
View user's profile Send private message
poppersmarty
Smarty Rookie


Joined: 27 Nov 2010
Posts: 6

PostPosted: Thu Apr 12, 2012 11:58 pm    Post subject: Google map api Reply with quote

I am very very green.
However, It appears to me the the process at a very high level.

is

1. send and address to google
2. Google converts it to lat lon.
3. Google sends back the lat and lon
4. The address, and the lat and lon are stored in the db, on your server.
5. There after when you request a google map, the lat and lon is sent
from the db, and magic occurs, the map is displayed, and any marker at the
proper location on the map. The goole map sw uses the lat and lon to locate the center of the map. etc.

It is all very interesting. But the process is very esoteric.
Back to top
View user's profile Send private message
ChrisFah
Smarty Pro


Joined: 02 Nov 2009
Posts: 159
Location: Traun, Austria

PostPosted: Fri Apr 13, 2012 8:11 am    Post subject: Reply with quote

Hi, I also did not want to request lat/lang coords for each place. i found a hidden but documented way to use adress.

PHP:
Code:
$google_maps = 'http://maps.google.com/maps?q=ZIP+CITY,+ADRESS,+COUNTRY(TEXT_IN_BUBBLE)&output=embed
&t=h&z=ZOOMLEVEL&hl=LANGUAGE&iwloc=addr&mrt=realestate';


NOTE: All whitespaces have to be replaced by "+".
NOTE: value for zoomlevel: 1-15, value for Language: en, de ...
NOTE ALSO: This method produces sometimes wrong results with small cities which have same ZIP code and streets have simiar names. It seems Google prefers the ZIP code rather than the city name to find a city and looks for the streetname using a fuzzy search method. When this happens, it is useful to use the "local" country domain for google host rather than google.com.
Eg: maps.google.at gives correct result but maps.google.com shows similar street in neighbor city.

HTML:
Code:
<iframe src="'<?php echo $google_maps; ?>'" width="WIDTH_OF_IFRAME" height="HEIGHT_OF_IFRAME"></iframe>


Regards, Chris
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP