This question is locked. New answers and comments are not allowed.
I added a map to my application with this piece of JavaScript code:
var curPos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
if (map == undefined) {
map = new google.maps.Map(document.getElementById('map-canvas'), {
sensor: true,
zoom: 13,
center: curPos,
mapTypeId: google.maps.MapTypeId.ROADMAP,
panControl: false,
streetViewControl: false,
zoomControl: false
});
markerIcon = { path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 6, fillColor: '#DD88EE', fillOpacity: 1, strokeWeight: 1, rotation: 23 };
currentPositionMarker = new google.maps.Marker({
map: map,
position: curPos,
icon: markerIcon
});
}
I cannot find the reason why there is just a part of the map shown on my screen, and the marker is positioned in the very top left corner of it (not visible in the screenshot since it is 'outside' of the screen)
I have a sample application and would like to attach it to this post so that you can reproduce the problem, but .zip files are not allowed.
Kind regards,
Gerhard
var curPos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
if (map == undefined) {
map = new google.maps.Map(document.getElementById('map-canvas'), {
sensor: true,
zoom: 13,
center: curPos,
mapTypeId: google.maps.MapTypeId.ROADMAP,
panControl: false,
streetViewControl: false,
zoomControl: false
});
markerIcon = { path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 6, fillColor: '#DD88EE', fillOpacity: 1, strokeWeight: 1, rotation: 23 };
currentPositionMarker = new google.maps.Marker({
map: map,
position: curPos,
icon: markerIcon
});
}
I cannot find the reason why there is just a part of the map shown on my screen, and the marker is positioned in the very top left corner of it (not visible in the screenshot since it is 'outside' of the screen)
I have a sample application and would like to attach it to this post so that you can reproduce the problem, but .zip files are not allowed.
Kind regards,
Gerhard