GeoPolylineField show coordinates in different coordinate system

When drawing a Polyline on a map using the GeoPolylineField, its coordinates are automatically shown in the parametrization field (see image below). I would like to have the option to show these coordinates in a different coordinate system; RD New in my case (EPSG 28992).

image

Hi Martijn,

Thanks for the feedback, we will add this request to our internal feature tracker.

In the meantime, For a GeoPoint, you could show both the lon, lat coordinates, as well as the RD coordinates by adding an OutputField to your app, this would look like this:

def geopoint_to_rd(params, **kwargs):
    return RDWGSConverter.from_rd_to_wgs(params.geopoint.coords)

class Parametrization(ViktorParametrization):
         geofield = GeoPointField("field_name")
         rd_coordinates =  OutputField('point in RD', value=geopoint_to_rd)

regards,
Paulien

1 Like