Improve company productivity with a Business Account.Sign Up

x
?
Solved

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

Posted on 2010-08-26
5
Medium Priority
?
532 Views
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?

Thanks!
Rose
0
Comment
Question by:rdurban
  • 3
  • 2
5 Comments
 
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:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3350.html

HTH, ~Ray
0
 

Author Comment

by:rdurban
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.

Thanks!
Rose
0
 
LVL 111

Accepted Solution

by:
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
0
 

Author Closing Comment

by:rdurban
ID: 33563512
Thanks Ray!  It was great!

Rose
0
 
LVL 111

Expert Comment

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

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

579 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