Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'rd is not defined' error on Google Maps integration

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/

like image 889
Shile Avatar asked Jun 11 '14 23:06

Shile


People also ask

Why isn't my Google Maps API working?

There are a several reasons why your google maps may not be working, the most common issue being no Google Map API key set or set incorrectly. To use the Google Maps JavaScript API, you must register your app project on the Google Cloud Platform Console and get a Google API key which you can add to your app.

How do I know my Google map API key is working?

Go to the Credentials section, which can be accessed from the left side bar under Google Maps Platform > Credentials. Check that the API key you currently use on your website is listed. If that's not the case, switch to a different project, and check the credentials there.


2 Answers

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.

like image 72
nebrot Avatar answered Sep 24 '22 21:09

nebrot


This is a known platform bug with firebug 2.0 under firefox 30.

Either disable the Firebug script panel or use Firefox 31 beta.

See corresponding

  • Firebug issue tracker link
  • Mozilla Bugzilla link
like image 36
Mithun Sreedharan Avatar answered Sep 24 '22 21:09

Mithun Sreedharan