IMHO, the intersection point between the two longest of the 4-sides is clearly the focal point..this is the bottom point and... hence the intersection point bottom is aligned over the position.<br><br>Perhaps what you are really raising is that the default icon does not clearly focus its attention on the bottom of the icon. An arrow / teardrop, flag or triangle may be a clearer option? I would agree the default is not as good as it could be.
<br><br><br><div><span class="gmail_quote">On 10/29/07, <b class="gmail_sendername">Bart van den Eijnden (OSGIS)</b> &lt;<a href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list,<br><br>can anybody explain why the calculateOffset from the defaultIcon places the<br>icon on top of the point, and not in the center of the point?<br><br>OpenLayers.Marker.defaultIcon = function() {<br>&nbsp;&nbsp;&nbsp;&nbsp;var url = 
OpenLayers.Util.getImagesLocation() + &quot;marker.png&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;var size = new OpenLayers.Size(21, 25);<br>&nbsp;&nbsp;&nbsp;&nbsp;var calculateOffset = function(size) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return new OpenLayers.Pixel(-(size.w/2), -size.h
);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp;&nbsp;return new OpenLayers.Icon(url, size, null, calculateOffset);<br><br>Best regards,<br>Bart<br><br>--<br>Bart van den Eijnden<br>OSGIS, Open Source GIS<br><a href="http://www.osgis.nl">
http://www.osgis.nl</a><br><br><br><br><br><br>_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/dev">
http://openlayers.org/mailman/listinfo/dev</a><br></blockquote></div><br>