ich ein Google Maps Marker wollen auf einem bestimmten Zoomstufe auf einer festen Größe zu sein, wie in diesem Beispiel: http://jsfiddle.net/bryan_weaver/4rxqQ/Prevent Marker von Skalierung, wenn Auszoomen
function initialize() {
var map;
var centerPosition = new google.maps.LatLng(38.713107, -90.42984);
var options = {
zoom: 9,
center: centerPosition,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map($('#map')[0], options);
var icon = 'https://www.google.com/mapfiles/marker_black.png';
var iconBounds = constructBounds(38.713107, -90.42984);
var staticOverlay = new google.maps.GroundOverlay(icon, iconBounds);
staticOverlay.setMap(map);
}
function constructBounds(lat, lng){
var sw = new google.maps.LatLng(lat - .03, lng - .025)
var ne = new google.maps.LatLng(lat + .03, lng + .025)
return new google.maps.LatLngBounds(sw, ne);
}
google.maps.event.addDomListener(window, 'load', initialize);
Aber ist es eine glatte Lösung als in über Jsfiddle?
Was ist nicht "glatt" in der oben genannten? Und was ist deine Definition von "glatt"? – MrUpsidown
@MrUpsidown Ich dachte, es wäre möglich, wie zum Beispiel eine Option in neuen google.maps.Marker. – Kristoffer