homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

google maps - when certain keyword entered in search go to URL?
google maps

5+ Year Member

Msg#: 4460750 posted 2:49 pm on Jun 2, 2012 (gmt 0)


sorry for bad english in advance. My question is this, if there is a normal website that uses google maps with search function is it possible to redirect user to anoather page from the same site if he enters certain keyword in search?

could you show me how?

here is normal javascript code for google map with search function:

var geocoder;
var map;
function initialize() {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(75.4200, 80.7000);
var myOptions = {
zoom: 7,
center: latlng,
mapTypeId: google.maps.MapTypeId.HYBRID,
panControl: true, panControlOptions: {position: google.maps.ControlPosition.LEFT_TOP}
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

function codeAddress() {
var address = document.getElementById("address").value;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
} else {
alert("Error: " + status);

i know a site that is doing this but in really complicated way + adding some keywords and markers on the map. basicly much more than i need but i dont whant to put the code here couse i dont know if they would like that.



5+ Year Member

Msg#: 4460750 posted 2:52 pm on Jun 2, 2012 (gmt 0)

or if you can give me some links or something it would also be helpfull

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved