Bing Maps - GeoPack
Last updated
Was this helpful?
Last updated
Was this helpful?
It is possible with no code to:
a) Add a Bing Maps control to your online forms to capture geolocation
b) Push/pull geolocation data captured on the map into/out of OpenProcess
To add a map you need to click 'Add Item' in the Design Tools menu. This will appear similar to the following where the Map control is in the bottom row of the grid below:
When you click to add the map the following options available to you will be as follows:
Text search option label
Search
This is what the customer sees as the call to action to choose to search for the location rather than use their geo-location. See how in the map above this has been adjusted to be 'Search for the location'.
Text search option placeholder text
search
This is what is shown as a guide inside the search box. I.e. this disappears when the user starts typing in the search box.
My location option label
My location
This is the label shown for the customer to know to use their location. Hence in the above example this has been updated to 'Use your location' which is more intuitive.
Selected location coordinates label
Selected location coordinates
This is what is shown on the PDF adjacent to the coordinates
Selected location hyperlink label
Selected location hyperlink
This is what is shown on the PDF adjacent to the hyperlink that will take a user to view the map of the location they specified
Mandatory
Blank
By default it is not mandatory. If it is mandatory a warning is needed see below.
Mandatory warning
Blank
You need to provide a warning contextual to the user.
Default mode
Blank
You need to select either Road or Aerial (like satellite view). Note that a user can choose from other views once the map has loaded.
Default zoom level
Blank
I'd suggest using a zoom level of 10. The lower the number the higher up i.e. further away from street level you start.
Search filter - country
Great Britain
You can update to use Australia/USA.
Default centre latitude
51.50632
See the notes below
Default centre longitude
-0.12714
See the notes below
The default location is the centre of London. So odds are you will want to change this. So easily get the latitude and longitude of a location go here:
Type in the default latitude and longitude and once done move the cursor on the map from London to the location you wish to. This will then give you the relevant location. For example, if I wanted to place the default location to be Lambeth Town Hall in London I would move the cursor on this map to here and I would then see where my default lat/longitude should be:
When a user selects to search for the location, we are using a real-time Bing Maps search meaning it is very powerful and can locate places anywhere in the UK in seconds.
The following illustrates an example of searching where it prioritises the results to be those closest to section of map currently in view:
If we consider the last search and look at Wimpole Mews, we can also leverage some other functions by virtue of using the Bing Maps API.
Namely:
Aerial view
Birdseye view
Street view
Where a user chooses to use their geo-location, it will the first time this is done request permission to use their location. If they deny this then clearly they will need to use the search function. If they accept it will automatically use the geo-location services on their device to locate them:
There is just one setting that are needed to make this work, which is your Bing Maps API key. The setting is:
MapsApiKey
To get the Bing Maps API key, you need to create a Bing Maps (free) developer account:
This will enable a basic API key to be retrieved. This allows 125,000 look ups per annum and is more than a council will need.
In the last article, we saw that it was possible to map 'Fields' from the form into an OpenProcess automatically without any code (or anything technical required).
It is possible to:
a) Map a geolocation point selected from a form and pass it to OpenProcess
b) Show details of existing tasks with a geo-location point held in OpenProcess on a map
First, you need to create a process, which has a Field type of Geographic Location, as shown below:
And ensure this is set as the Geotag Field in the Process Details tab:
Now we need to link the map that is capturing the report location to the geotag we created for our process - so open your form and using Add Item add a map:
Once in Design Mode click to edit the map.
There, ensure to use the same code you got from OpenProcess in the Field Id as shown below:
To retrieve processes from OpenProcess, it is as simple as clicking the 'Get locations from OpenProcess' checkbox as shown in the blue outlined box below:
You can control, how far beyond the centre of the current map, it should look for OpenProcess processes.
Only processes, which have a Geotag set against them in process details in OpenProcess will appear in this list.
Once done these jobs will appear as red dots on the map as shown below.
Add an action to connect your form to the OpenProcess above, as shown in the last and you will have linked your form to be able to trigger the process.