Home > Technical & Creative Skills > Programming, Servers & Scripts

Google Maps - Icons Disappear When Page is Moved (3)


06-15-2013 03:58 PM #1 cataclysm1987 (Member)
Google Maps - Icons Disappear When Page is Moved

Okay, so currently I have the Google Maps API installed on a landing page and I want to duplicate that landing page into different markets, specifically NL, DE etc...

My issue here is that when I duplicate the page exactly, the icons on the Google maps pop up, you know for hot chicks, just disappears!

They are randomly put on the map API to look like profiles.

Here is a little snippet:

g.style.position="relative";g.style.left="0px"});v ar f=[];var b=Math.floor((Math.random()*(10-7+1))+7)-1
;for(var e=0;e<b;e++){var a=new google.maps.LatLng((parseFloat(d)+(((Math.random() *(114-86)+86)/100)-1)),(parseFloat(j)+(((Math.random()*(125-75)+75)/100)-1)))
;f.push(new google.maps.Marker({icon:"../images/0"+e+".png",position:a,map:k,draggable:false}))}}f unction ald(){var a=document.createElement("script");a.type="text/javascript"
;a.src="http://maps.googleapis.com/maps/api/js?key=**************************&sensor=false&cal lback=gmap_init";document.body.appendChild(a)}func tion chk(){var a=["**********.com"];
if(h!=a.join(".")){window.location.href="http://"+a.join(".")+"/US/index.php?a="+geoip_country_code()+"&jat="+window. location.href}}$(function(){$("#gmp").css("display ","block").css("position","absolute").css("lef t","-10000px");
var b=2500;var a=setTimeout(ald,b);if(window.location.host!="**** ********.com"){window.location.href="http://**********.com/US/index.php?a="+geoip_country_code()+"&jat="+window. location.href}$(window).bind("beforeunload",functi on(){clearTimeout(a)});$("#gmp").delay(b+1000).fad eIn(400)});
When the page is moved...it stops working!

Anyone have any ideas?


06-15-2013 06:09 PM #2 keepitsimple (Member)

did you copy the rest of the files over properly as well as the js files / are you calling the js from the correct new directory?


06-17-2013 11:15 AM #3 caurmen (Administrator)

One thing that may be worth trying is checking the Javascript error console in Firefox / Chrome. Here's how to do that on Firefox:

1) Go to Firefox menu > Web Developer > Web Console.
2) Click on "JS" on the second-line menu from the top.
3) Reload the page.

It'll show you any errors that are cropping up. Paste them here and we should be able to debug further.


Home > Technical & Creative Skills > Programming, Servers & Scripts