Custom marker icon to be centered at coordinates, not "above" them

Hello,
I use custom marker icons to display locations on the map. Since I need to use circles (standardized images) to display the markers, the locations appear slightly incorrect, since the marker icons sit "on top" of the indicated location, and are not centered around the location. Is there a way how to change this behaviour? I didn't find hints in the docs and no related posts here. I am using openlayers, so a solution could be specific to that.

Thank you!

Best regards
Simon

Hi,

This is indeed the default marker position when using custom marker images.

Unfortunately the marker anchors feature is currently only available for TTMSFNCGoogleMaps where you can use the Markers[].Anchor property to specify a custom marker anchor position.

However this is a good suggestion and we'll investigate if marker anchoring can be added for the TTMSFNCOpenLayers service as well.

That would be much appreciated! We cannot easily switch to Google Maps and currently our users complain that the display of the locations is misleading. Anything hacks with scaling the icon image cannot work because it will always scale down and align to the bottom, right?

I have done this by adjusting the latitude of the marker depending on the marker height and the zoom level. It is inelegant, and the marker must be repositioned each time the user changes zoom level, but it kind of works:

latoffset:=360/power(2, zoomlevel+1); // degrees per tile
latoffset:=latoffset/256; // degrees per pixel
latoffset:=latoffset*50; // 50 is half the marker height in pixels

TMSFNCOpenLayers1.addmarker(latitude-latoffset, longitude, ...