Solved

Google Maps HREF on Hover Move View and Zoom

Posted on 2010-09-08
5
555 Views
Last Modified: 2012-05-10
Hi,

I have a website with international distributors on it - There are distributors all around the world, what I would like to do is:

1) Create a HREF Text link, as people hover over the link, it moves the view and zoom of the map to that country. The problem I have right now is that the worldwide map is so far out in zoom, that some distributors are hiding others - By zoomng in on hover of the country text link href, it should show the 2 markers closer up at a country level zoom remedying this problem.

Thanks!
0
Comment
Question by:intangiblemedia
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:senthilkumarsb
ID: 33626760
the below link will help you more... Here every thing explained clearly.

http://n01se.net/gmapez/start.html
0
 
LVL 18

Expert Comment

by:Matthew Kelly
ID: 33632665
Attached is a working example of mouseover zoom in and pop up.

I set the zoom to 7, but you can change that in the "mymouseover" function.

You can remove the mouseout function if you don't want it.
test.html
0
 

Author Comment

by:intangiblemedia
ID: 33634174
Thanks Mathew,

If I click the link, will it stay on that marker?
0
 
LVL 18

Accepted Solution

by:
Matthew Kelly earned 500 total points
ID: 33642100
The attached is an example of where the click saves the position. It is done by added a variable to save the last clicked location and adding an onclick event.

If you want it to go back to the last clicked location instead of the center onmouseout change:

map.setCenter(new GLatLng( 9.1088986592431382, -56.6015625), 2);

To:

GEvent.trigger(gmarkers[clickedMarker], "click");
var point = gmarkers[clickedMarker].getLatLng();
map.setCenter(point,7);
test.html
0
 

Author Closing Comment

by:intangiblemedia
ID: 33816932
Thanks Matthew
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

730 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