Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

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

google maps



2:49 pm on Jun 2, 2012 (gmt 0)

5+ Year Member


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.


2:52 pm on Jun 2, 2012 (gmt 0)

5+ Year Member

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

Featured Threads

Hot Threads This Week

Hot Threads This Month