Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Google Maps Pins in wrong place (and move)

Posted on 2014-03-06
2
Medium Priority
?
207 Views
Last Modified: 2014-03-06
Hello,

I have this page, which is simply bizarre:

http://www.villasdirect.com/top-destinations.asp?Country=France&property-type=rentals

The pins are supposed to be in France, and when you move your mouse over the names on the left, they do move into their correct position, but not when the page loads...

I have attached the code for the page - help appreciated!

Thanks in advance ;-)
map.txt
0
Comment
Question by:Nico2011
2 Comments
 
LVL 23

Accepted Solution

by:
Snarf0001 earned 2000 total points
ID: 39909850
Go to your PlaceMarkers function.

When you create the marker, you're setting the "icon" to the "MarkerImage" you just made.
MarkerImage has been deprecated and was glitchy to begin with.
It's being fixed on the hover, because the mouseover / mouseout commands are then just calling .setIcon with the image url, instead of the MarkerImage object.

in var marker = new google.maps.Marker(.....
replace icon:img with icon:imgnam and it should work properly.

Couple other things if you're cleaning up...
1) A few lines above that you're adding an event listener for a marker variable that hasn't been declare yet.
2) You're missing the end head tag and the beginning body tag.
3) You're loading the google maps api twice, once in the head and once underneath the map
4) You're loading three different versions of jquery at various points in the page.
0
 

Author Closing Comment

by:Nico2011
ID: 39909888
Thank you sooo much - works perfectly!

I will fix the other errors when I get a moment too...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses

972 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