[Merkaartor] Relations

Gunter Grau ggrau at freenet.de
Thu Jul 8 22:46:19 BST 2010


Hi Peter,

Am Mittwoch, 30. Juni 2010, 23:47:20 schrieb Peter Conrad:
> Hi there,
> 
[...]
> actually is not anymore the bounding box of all members (see
> http://www.mocacher.de/osm-relation-selected.png). I just cannot find
> any predictable point on the map that selects the relation. Somehow this
> point is somewhere within the bounding box, but not in even in the
> middle.
[...]
> Regards,
> 
> Peter
> 

I had a look on this tonight.
I am pretty sure you accidently acitvated OSGB36 projection. If you activate 
the showing of the lat/lon Grid you can see that it is not parallel to the X/Y 
Axis. 
The bounding box of a relation is currently calculated using the lat/lon 
coordinates. 
Now when pointing the box around the relation, 2 oposed nodes of the bounding 
box are projected and from these the box to draw is retrieved.
Unfortunately when calculating the box for the Snap event, the other 2 oposed 
nodes of the bounding box are used. In case that the lat/lon grid is not 
parallel, this box will not be the same.
So to hover and focus a relation, you must find an invisible box.
I started a merge request for a hotfix to calculate the snap box in the same 
way than the drawn box. 
Since I am not really happy with this solution, I will think about an easy way 
for better bounding box calculation.

Regards, Gunter




More information about the Merkaartor mailing list