ThinkGeo.com    |     Documentation    |     Premium Support

GeoPen scaling problem

Hi Ben,

Since version 14.4.0-beta023 I have a major issue with my linetypes.
When drawing Road Markings for instance I need to show them like in real world.
Therefore we change the GeoPen dashpattern for each zoomlevel to show the line like it is in real world.
In the picture below, you can see the road markings almost have the same width, length and empty space as the real world.

Version 14.4.0-beta022 (correct):

Since beta023 this is not working anymore. The linetype keeps changing for every zoomlevel.
I’ve tried to find what’s wrong, but it seems like a bug.

Can you fix this please !

Kind regards,
Guido van den Boom

Hi Guido,

I believe you’re using GeoPen.DashPattern with LineDashStyle.Custom. If you multiply each value in GeoPen.DashPattern with GeoPen.Width, it will be exactly like before.

The values in DashPattern is supposed to be in pixel while in the old version it takes the ratio of DashLength/GeoPen.Width. We fixed it in beta023. Sorry for the inconvenience.

Thanks,
Ben

Hi Guido,

We figured out the values in DashPattern is supposed to be the ratio of DashLength/GeoPen.Width, instead of the actual pixel. So we changed it back in beta043. Sorry about this back and forth, please pull the latest beta and change your GeoPen.DashPattern back to the ratio of DashLength/GeoPen.Width.

Thanks,
Ben

Hi Ben,

No worries, this was an easy fix :wink:

Thanks,
Guido

Thanks, Guido! :grinning: