Tuesday, 20 August 2013

Part of Google Maps' elements disappeared

Part of Google Maps' elements disappeared

I have a strange problem. My shadow and Zoom controls suddenly dissapear
from my map. I haven't done antyhing to it or containers associated with
it. Here's the code:
<script
src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"
type="text/javascript"></script>
<script type="text/javascript">
document.write('<div id="gmap" style="width:960px;
height:360px;"></div>');
function init() {
var map_center = new google.maps.LatLng(52.372796,
16.889006);
var shadow = '../shadow.png';
var map = new google.maps.Map(
document.getElementById("gmap"), {
zoom: 11,
center: new google.maps.LatLng(52.372796, 16.889006),
mapTypeId: google.maps.MapTypeId.ROADMAP,
panControl: false,
streetViewControl: false,
mapTypeControl: false,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL
},
styles: [
{
featureType: 'all',
elementType: 'all',
stylers: [
{ visibility: "on" },
{ saturation: -100 }
]
}]
});
var pos = new google.maps.LatLng(52.372796, 16.889006);
var marker = new google.maps.Marker({
position: pos,
map: map,
icon: '../pointer.png',
shadow: shadow
});
}
window.onload = init;
</script>
Only thing displaying now is the marker.

No comments:

Post a Comment