0

I have a plugin I'm working on that uses the Google Maps API v3. Works like a charm, except in Firefox!

I present to you the following URL: [REDACTED BECAUSE SOLVED]. You'll notice that if you're using firefox there is a gray box with google maps stuff available. If you use Chrome, you'll see a nice map with google maps stuff.

So that's my problem, and I'm really hoping someone here can point me to the solution.

This is the code I'm using to create the map:

function initialize() {
    var myLat = document.getElementById('latitude').innerText;
    var myLng = document.getElementById('longitude').innerText;
    var myLocation = new google.maps.LatLng(myLat, myLng);

    var mapOptions = {
        center: myLocation,
        zoom: 15,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map"),mapOptions);

    var markerOptions = {
        position: myLocation
    };
    var marker = new google.maps.Marker(markerOptions);
    marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
Malou
  • 3
  • 2

1 Answers1

0

innerText is not supported in Firefox.

references:

Community
  • 1
  • 1
geocodezip
  • 158,664
  • 13
  • 220
  • 245