getEntityMercatorLocation
Returns the Mercator location of the entity with the given id, resolved via the engine's point/polygon/polyline tables.
Use this instead of getLocation for any distance calculation. EntityZone.getLocation() returns a MercatorZone with x=0, y=0 because LIME's EntityZone struct doesn't carry the location — surfacing as the "11,065 km" search-distance bug when distance was computed from a valid user position to a zero-coord entity zone.
Resolution order:
- If the engine Entity has
pointId > 0: use the point's (x, y). - Else if
polygonId > 0: use the polygon centroid. - Else if
polylineId > 0: use the polyline's first vertex. - Otherwise return
null— caller decides to skip the distance calc.