Collecting data in the field can be a time, consuming, arduous task, but it doesn’t have to be with the right solution in your back pocket.
With Geocortex Mobile, you can make your field workers jobs much easier by automating the process of taking their data offline using custom map areas and streamlining your offline data collection processes
Get a better idea of how this works in this week’s Geocortex Tech Tip video, where we’ll walk you through how to create custom, offline map areas in Geocortex Mobile by utilizing Geocortex Workflow technology.
“Hi everyone! My name is Patrick Fingler and in this Tech Tip video, I’m going to show you how you can create custom mobile app areas inside of Geocortex Mobile using Geocortex Workflow. Let’s dive in!
Here, you can see I’m using Geocortex Mobile and here I’ve got the Map Areas panel open and there’s a variety of different ways you can create map areas, which are essentially areas
that you can download your data so that you can use it offline in a disconnected environment.
What we see here, is you can see there’s a couple of pre-populated map areas in the listing
here and these can be administrator-defined. On the underlying web map, within the settings for the underlying web map that you’re using in Geocortex Mobile inside of ArcGIS Online or ArcGIS Enterprise, you can create what are called Administrator Defined Map Areas which could be like the top you know five or ten most common areas that your field workers need to navigate to.
Additionally, as an end user using the application, I can click this Add Area button. This will open up this Create Area tool and I can create a custom map area within a given extent that I want to navigate to.
Now what’s really nice is there’s essentially commands that fire that all of these different operations for creating a map area, downloading, activating the map area and so on and those can be leveraged using Geocortex Workflow.
So actually, outside of the out of the box tool here, I’ve got from the I want to menu, I’ve got this workflow that allows me to manage my map areas. Now this is a very simple workflow, but you could have a workflow, for example that gets the current logged in user, gets their username and then creates a map area for all of the work orders that they’ve been assigned, and creates a very custom specific geographic extent and downloads that data.
Here I’ll show you how you can accomplish that.
Within this workflow I’ve got four different options. One, is to create an app create a
map area, this will just open up the out-of-the-box option, another one is just through workflow to create a or add a map area. One is updating a map area, as well and then also I’ll be showing you how you can delete map areas using Workflow as well.
If I click this, Create option and just click submit here, it’s just going to immediately navigate us to this option here to create an area.
Let’s look at the workflow to see how this works.
This is the back-end workflow that I’ve configured. Here you can see this is our display form which has the options that whether the user wants to create, add, update or delete and then they’ve also got an option to click submit which will then proceed or cancel.
Again if we continue, we can see if the result is submit, we’ll continue otherwise we’ll
exit and then this is essentially doing some branching logic depending on the radio button option that they selected. If they click Create for example, here you can see there’s this Run Command Activity and this is where we can run specific Geocortex Mobile commands. So, there’s this command called ‘offline.display-create-area’ and this accepts what’s called a map extension.
If we actually navigate to our Developer Center and go to Geocortex Mobile and select
API and go to Commands and its offline display create area. If we just search for ‘offline.display-create-area’, you can see here there’s this command and then this is the argument which is a map extension.
How you actually get this map extension using Geocortex Workflow is here. If we go into the setup, I’ve got I’m using the Get Map activity and then this allows me to, I’m just creating a variable or a value called Map Extension, but you could just supply this as well. So, it’s just it ‘=map.map.mapExt’ and that will give you the map extension.
Additionally, while we’re here there’s another activity or sorry another command that allows you to get all of the offline areas. So, the list of the offline area. If we were to cancel this, it’ll show you which offline areas you have available and that’s ‘offline.get-areas’ and this would also accept this map extension property.
Let’s go back and here you can see. So, I’m just simply running a command here is ‘offline.display-create-area’ and this is going to take us to – again, if I was to rerun that
and click Submit – it’s just going to take us to this option.
The next method is, you might want to create a map area on your own using Workflow.
Here I’m going to select this Add option and click submit and here you can actually see if we navigate to the Map Areas tab, I’ve created a map area. I’ve just called it an arbitrary name.
I’ve called it ‘Created_Area’ in my workflow and it’s now downloading that map area. I’m essentially getting the current extent and then I’ m just creating a map area with that current extent and then it’s going to then activate it as well.
While that’s downloading, and the next time we come back here you’ll see it’s been activated, let’s go back to the workflow again.
You can see here when we select the Add option, there’s this operation used to essentially create that area. So it’s ‘offline.create-area’ and these are the parameters that I’m using.
Here this is the title I’ve supplied. This it’s essentially a variable name, but you could also just type in ‘Created Area’, if you wanted to and then there’s this areaDetails property, where I’m specifying the area of interest which is my current extent. You can define the minimum and the maximum scale, whether you want to include attachments and if you also have some offline tile packages that you want to include, you can supply the name of those tile packages as well.
You can also optionally remove this option and then it would just take the base map of the current from the current web map and then lastly here it does require a map extension. So here I’ve got a map extension.
This is going to create that area and then here I’m going to then download that area. The output of this operation will create an area and we can supply that to this option.
Here my ‘offlineArea’ input is this ‘createArea.result’ which is the output of this activity
and then lastly here, I’ve got this Activate Area operation as well which is the same inputs as the Download Area option. So, it will again accept that ‘createArea’ property and object and then it’ll
If we again go back to Geocortex Mobile, you can see now it’s been activated and I’ve created an offline area with my current extent.
The next step is to then update that.
So, if we go to Update and click Submit, you’ll see here if we go to my Map Areas tab, you can see now we’re through Workflow forcing the update option to persist.
You could theoretically have a workflow that you know runs every minute and it updates the activity, if you have internet connectivity.
Here you can see it was created at 9:51 AM and updated at 9:54 AM.
How that option works is again, if we go back to our workflow here, we can see we’re now actually looping over all of the offline areas.
We’re using that command or sorry that operation to get all the offline areas. This is going to give us a list of all of the areas, and then we’re going to loop through those and then we’re going to say here, I’m just saying if the title of that offline area matches the one that I provided it with, which is ‘created_area’, then I want to update it.
You could alternatively also try to update all of your map areas if you wanted to and here there’s this operation ‘offline.update-area’ and because we’re looping over each area, I’m just going to provide it with the item that we’re looping over.
So, that’s essentially the process that you can use for updating your map areas and again we can click OK, and it’s essentially that same process for deleting map areas as well there’s a delete operation and you’d be doing that same underlying process.
Let’s navigate back here again. That was updated and let’s show you that you
can also delete it. Let’s go to manage map areas and click Delete and click Submit. There we can see it’s now been deleted.
That’s essentially how you can work with custom map areas using Geocortex Workflow.
Again, I’d highly recommend checking out our Developer Center and these specific commands and operations as they’ll be very helpful as you start working with creating custom map areas using Geocortex Workflow.
Bye for now!”
Want to learn more about how Geocortex Mobile can streamline your mobile app development? Click the button below for more information, or to schedule a personal demonstration.