Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18832
| From | "Tony" <tony.johansson@inport.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | problem with google map when using IE 10 |
| Date | 2013-03-11 08:36 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <khk1f5$h4q$1@dont-email.me> (permalink) |
This javascrip works fine when I use Firefox but when I switch to IE 10 I
get error saying google has not been defined
How do I make it work in IE 10 ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript"
src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("maps", "2", { "other_params":"sensor=false" });
function init()
{
map = new google.maps.Map2(document.getElementById("map"));
var myLatLng = new google.maps.LatLng(58.135148, 12.122726,
true);
map.setCenter(myLatLng, 15);
var myMarker = new google.maps.Marker(myLatLng, { "title":
"Eken" });
map.addControl(new google.maps.LargeMapControl());
map.addControl(new google.maps.MapTypeControl());
map.setMapType(G_SATELLITE_MAP);
map.addOverlay(myMarker);
};
google.setOnLoadCallback(init);
</script>
<title>My first Google Map</title>
</head>
<body>
<div id="map" style="width: 400px; height: 400px; margin: auto;
background-color: red">
This is where the map will soon appear.
</div>
</body>
</html>
//Tony
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
problem with google map when using IE 10 "Tony" <tony.johansson@inport.com> - 2013-03-11 08:36 +0100
Re: problem with google map when using IE 10 Andrew Poulos <ap_prog@hotmail.com> - 2013-03-11 19:33 +1100
Re: problem with google map when using IE 10 "Tony" <tony.johansson@inport.com> - 2013-03-11 10:05 +0100
Re: problem with google map when using IE 10 Andrew Poulos <ap_prog@hotmail.com> - 2013-03-11 20:27 +1100
Re: problem with google map when using IE 10 "Tony" <tony.johansson@inport.com> - 2013-03-11 10:52 +0100
Re: problem with google map when using IE 10 "Tony" <tony.johansson@inport.com> - 2013-03-11 12:37 +0100
Re: problem with google map when using IE 10 "Tony" <tony.johansson@inport.com> - 2013-03-11 13:25 +0100
csiph-web