Hi list,
can anybody explain why the calculateOffset from the defaultIcon places the
icon on top of the point, and not in the center of the point?
OpenLayers.Marker.defaultIcon = function() {
var url = OpenLayers.Util.getImagesLocation() + "marker.png";
var size = new OpenLayers.Size(21, 25);
var calculateOffset = function(size) {
return new OpenLayers.Pixel(-(size.w/2), -size.h);
};
return new OpenLayers.Icon(url, size, null, calculateOffset);
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev