Reputation: 3
i have a facebook app using Heroku and i use a google map for it. The google map is displayed only in Firefox Browser. Chrome an IE will not display it!
I can't understand why and i need your help!
https://apps.facebook.com/sectorsase/
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>
<script>
function initialize()
{
var IPos=new google.maps.LatLng(4.256,4.568);
var mapProp = {
center:new google.maps.LatLng(44.438683,26.027269),
zoom:13,
disableDefaultUI:true,
draggable: false,
zoomControl: false,
scrollwheel: false,
disableDoubleClickZoom: true,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById('googleMap'),mapProp);
var marker=new google.maps.Marker({
position:IPos,
icon:'icn.png'
});
var myCity = new google.maps.Circle({
center:IPos,
radius:3,
strokeColor:'#0000FF',
strokeOpacity:0.8,
strokeWeight:2,
fillColor:'#0000FF',
fillOpacity:0.4
});
myCity.setMap(map);
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
google.maps.event.trigger(map, 'resize');
</script>
</head>
<body>
<center><div id='googleMap' style='width:500px;height:380px;'></div></center>
</body>
</html>
IE ERROR:
SEC7111: HTTPS security is compromised by http://maps.google.com/maps/api/js?sensor=false
map.php
SCRIPT1002: Syntax error
map.php, line 17 character 33
CHROME ERROR:
[blocked] The page at https://quiet-everglades-2697.herokuapp.com/map.php ran insecure content from http://maps.google.com/maps/api/js?sensor=false. map.php:1 Uncaught ReferenceError: google is not defined map.php:49
Upvotes: 0
Views: 598
Reputation: 16595
With the errors you've provided, I'm going to assume the page you're viewing is HTTPS. You're loading the Google Maps API from a non-HTTPS source. Just change the script
tag to https://maps.google.com/maps/api/js?sensor=false
. Or better //maps.google.com/maps/api/js?sensor=false
which will automatically fill in the http or https for you.
Upvotes: 4