Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

All the sudden I have this strange error and my Google Maps integration isn't working on Firefox anymore while on Chrome it works perfectly.

This is the code for my map:

 var map;
 var myCenter = new google.maps.LatLng(42.439071, 19.266683);
 var marker = new google.maps.Marker({
   position: myCenter
 });

 function initialize() {
   var mapProp = {
     center: myCenter,
     zoom: 14,
     draggable: true,
     scrollwheel: false,
     mapTypeId:google.maps.MapTypeId.ROADMAP
   };

   map = new google.maps.Map(document.getElementById("map-canvas"), mapProp);
   marker.setMap(map);

   google.maps.event.addListener(marker, 'click', function() {
     infowindow.setContent(contentString);
     infowindow.open(map, marker);
   }); 
 };

 google.maps.event.addDomListener(window, 'load', initialize);
 google.maps.event.addDomListener(window, "resize", resizeMap());

 $('#myMapModal').on('shown.bs.modal', function() {
   resizeMap();
 });

 function resizeMap() {
   if (typeof map =="undefined")
     return;

   var center = map.getCenter();
   google.maps.event.trigger(map, "resize");
   map.setCenter(center); 
 };

And I include it like this:

<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>

I get the following error

rd is not defined https://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/17/2/main.js (line 53)

Does anyone know how to fix this error?

Here is a JSFiddle to test it: http://jsfiddle.net/sTLY8/7/

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
353 views
Welcome To Ask or Share your Answers For Others

1 Answer

After updating my Firefox to Version 30 I have same problems with my Google Maps application:

ReferenceError: xd is not defined https://maps.gstatic.com/intl/de_ALL/mapfiles/api-3/16/13/main.js line 54 > eval`

It seems Firebug causes these errors and there's already an issue filed for this. I disabled the Script panel in Firebug and now it works again in Firefox.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...