How do I span a google map api v3 with a text link?

Posted on 2010-08-26
Medium Priority
Last Modified: 2013-11-10
I have a google map that displays multiple markers.  I am centering the map on the center of the zip code or city/state searched.  I am also finding the closest location based on lat/long distance and displaying that in a text string external to the map.

I need to have a link in the text string that will recenter the map on that location.  What is the bes tway to do this?

Question by:rdurban
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 111

Expert Comment

by:Ray Paseur
ID: 33550067
If you want to post the code you're using for this, I can probably show you how to recenter the map.  I would pass a "center=" argument in the URL (GET) string.  If present, I would use this geocode (lat/lon pair) to center the map.

I have a Google Maps API class that might be useful to you.  Please see the public method "setCenter" in the code here:

HTH, ~Ray

Author Comment

ID: 33554157
Thanks Ray,

I will give that a try.  It will probably be tomorrow afternoon before I am able to work on it again however.

LVL 111

Accepted Solution

Ray Paseur earned 2000 total points
ID: 33554800
Glad to help.  Please post back if you have any questions about the class or how it might be used.  Cheers, ~Ray

Author Closing Comment

ID: 33563512
Thanks Ray!  It was great!

LVL 111

Expert Comment

by:Ray Paseur
ID: 33565269
Thanks for the points!  It's a great question, ~Ray

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question