Some activities may need access to the map embedded in the Geocortex Mobile Application. The
MapProviderBase class can be injected in an activity and used to access the Map and MapView for the application.
This article will walk you through accessing the map from an activity and displaying a callout at the map center point.
Extending Geocortex Workflow for Mobile requires development and deployment of a custom Geocortex Mobile Application using the Geocortex Mobile SDK
Follow the instructions in the Geocortex Mobile SDK page to set up the environment for extending Workflow for Geocortex Mobile.
Set up the Activity
First, the basic activity needs to be setup and registered. Below is an example of an activity setup to take text to display in the map callout.
To inject the MapProviderBase, add a new Autofac factory property that injects a
MapProviderBase into your custom activity.
Next, we need to load the
MapView from the
Add a Callout at the Map Center
Finally, we can use the
MapView to get the map center and add a callout with the user's text.
Operations related to UI activities have to run in Xamarin's main thread, else they will throw an error.
Test your Activity
Now you can build a workflow for Geocortex Mobile that uses your new activity!
If you want your custom activity to show up with a friendly user interface in Geocortex Workflow Designer, check out Registering .NET Activities with Geocortex Workflow Designer.
RunActivity activity can be used to execute your activity by the name defined in
PlaceCalloutAtCenter.cs (for this example,
Next you need to run the workflow you just created in your Geocortex Mobile SDK project.
You can do this by configuring the layout and app config to run a workflow. You will need to copy the ID of the the workflow you created into the app.json
- App Config