Note that there are some explanatory texts on larger screens.

plurals
  1. POMarkers incorrectly changing location on zoom
    primarykey
    data
    text
    <p>I have a set of markers being added to a map at zoom level 15. The markers lat and lng are currently set to the 6th decimal place.</p> <p>When I zoom in or out the marker locations are moving out of their correct position. Do i need to remove and redraw the markers at each zoom level? do I need to increase the accuracy of my coords? this is driving me crazy...</p> <p>Test page: <a href="http://m.uwosh.edu/api/v1.0/map/" rel="nofollow">http://m.uwosh.edu/api/v1.0/map/</a> click on the yellow icon in the bottom bar.</p> <p>I'm creating my markers like so:</p> <pre><code>function createMarker(data, type) { var posn = new google.maps.LatLng(data.lat,data.lng); var title = data.title; var image,shadow,shape; if (data.typeId === '101') { image = new google.maps.MarkerImage('/api/v1.0/map/images/buildings.png', // This marker is 20 pixels wide by 32 pixels tall. new google.maps.Size(24, 28), // The origin for this image is 0,0. new google.maps.Point(0,0), // The anchor for this image is the base of the flagpole at 0,32. new google.maps.Point(0, 28)); shadow = new google.maps.MarkerImage('/api/v1.0/map/images/shadow-buildings.png', // The shadow image is larger in the horizontal dimension // while the position and offset are the same as for the main image. new google.maps.Size(39, 28), new google.maps.Point(0,0), new google.maps.Point(0, 28)); } var markerOptions = { position: posn, title: title, shadow: shadow, icon: image }; var marker = new google.maps.Marker(markerOptions); // could add event handler here //add marker to array for latter use if (type === 'building') { buildingMarkers.push(marker); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload