Vote count:
0
Good Morning Everyone,
I'm trying to open an HTML file with Internet Explorer (Please, don't mind the version, I've already tried with all of them).
That HTML file uses javascript code to create a Google Map in a div, but every time I try to open it with Internet Explorer, the browser shows the following message:
"Internet Explorer has stopped this page from running scripts or ActiveX controls that could access you computer."
I've already tried to change the security and privacy options but the message is still showing.
This is the javascript code I'm using right now:
<script type="text/javascript" src="http://ift.tt/NF9SGx"></script>
<script>
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
function initialize() {
directionsDisplay = new google.maps.DirectionsRenderer();
var mapOptions = {
zoom: 12,
center: new google.maps.LatLng(40.4889323, -3.6927295),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
directionsDisplay.setMap(map);
calcRoute();
}
function calcRoute() {
var start = new google.maps.LatLng(40.4889323, -3.6927295);
var end = new google.maps.LatLng(40.5485301,-3.648655);
var request = {
origin: start,
destination: end,
waypoints: [
{
location: new google.maps.LatLng(40.662707,-3.771187),
stopover: true
}
],
travelMode: google.maps.TravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
I will be very grateful if someone can help me or give me some advice about it.
Thank you very much in advance.
asked 26 secs ago
Opening HTML file with Internet Explorer
Aucun commentaire:
Enregistrer un commentaire