Change position to absolute, and round pixel values. This puts markers back in their place.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@196 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -51,8 +51,8 @@ OpenLayers.Layer.Marker.prototype =
|
||||
var resolution = this.map.getResolution();
|
||||
var extent = this.map.getExtent();
|
||||
var pixel = new OpenLayers.Pixel(
|
||||
1/resolution * (marker.lonlat.lon - extent.left),
|
||||
1/resolution * (extent.top - marker.lonlat.lat)
|
||||
Math.round(1/resolution * (marker.lonlat.lon - extent.left)),
|
||||
Math.round(1/resolution * (extent.top - marker.lonlat.lat))
|
||||
);
|
||||
var m = marker.generateMarker(pixel);
|
||||
this.div.appendChild(m);
|
||||
|
||||
Reference in New Issue
Block a user