Can i place pin in google map by address?

Dimitris Christoforidis 296 Reputation points
2021-03-07T20:39:44.557+00:00

I am using xamarin forms map, i need to ask if it is possible to place a pin in xamarin forms map using address instead position

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
0 comments No comments
{count} votes

Accepted answer
  1. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points
    2021-03-08T07:32:32.053+00:00

    Hello,

    Welcome to Microsoft Q&A!

    We can only set Position Property for map pin .

    In your scenario you can get location according to address using Xamarin.Essentials: Geocoding , and then set for pin .

       var address =  "Microsoft Building 25 Redmond WA USA";  
       var locations = await Geocoding.GetLocationsAsync(address);  
         
       var location = locations?.FirstOrDefault();  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful