Adding pins based on addresses for Mapsui

266 Views Asked by At

Is it possible to add a pin on the map based on an address only, without providing specific coordinates?

If yes, how and what information is needed (e.g. is postal code necessary)?

1

There are 1 best solutions below

8
Liyun Zhang - MSFT On

You can't do that. You can check the resource code of the Pin class in the Mapsui. The Location property has the Position class's default value.

So even you don't declare the Location property. It will also use the default value. So if you want to add the pin based on the addresses. You may need to custom the Pin class by yourself.

In addition, the address peroperty of the Pin class is type of string. You need to convert the string to a exactly position.