MAUI Map

This service is used to provide MAUI Essentials functionality to those using the trellispark MAUI application. Specifically the IMap interface which allows the ability to open and use the devices default map application when using the MAUI application.

This service is registered as a singleton service in the website and hybrid projects.

All methods in this service will return a string. If the returned string is empty, then the operation was successful. Otherwise, there was an issue, and the error is logged. The returned string can be displayed in an error notification to give the user visual feedback that something went wrong.

This service implements the IGI_Map interface and it’s reference name is Map. Key properties and methods this service provides are the following:

  • bool IsAvailable – The value True is returned since the user is using the trellispark MAUI application.
  • Task<string> OpenMapWithCoordinates(string lat, string lng) – When called this method will open the devices default map application and display directions to the passed coordinates from the users current location.
Example of the default map application opening with directions when using the MAUI application (Windows Desktop)
Updated on January 30, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment