Solved

Universal GUI - Maps


Userlevel 5
Badge +16
  • Thinkwise Local Partner Brasil
  • 387 replies

Hi. Is there more elaborate documentation available on the Maps component for the Universal GUI? 

I've read the docs and some postings here, but can't figure it out how I should set it up. 

And is there also a listing of supported Maps providers? Before I used MapQuest, does this still work? 

icon

Best answer by Kevin Horst 7 April 2022, 10:41

View original

This topic has been closed for comments

10 replies

Userlevel 5
Badge +16

As there is no response yet.. I have been reverse engineering from the insights application. But please update the documentation it's impossible to figure it out. 

However I have 2 questions:

  1. My base layer doesn't active by default, I have to activate it in the GUI. 
  2. Cannot get the lan/lon coordinates to work. 

So I have used the Google API to get coördinates, and get this result. 

"geometry": {
"location": {
"lat": -23.6526643,
"lng": -46.7260707
}

I have created a coördinates column and I added it as the default coördinates..   

 

and it positions it somewhere off the coast of Africa. 

 

@Kevin Horst ?

Userlevel 7
Badge +23

Hi Freddy,

I asked a colleague about this and he recommends creating a Data mapping entry like this:

Data mapping

That should help the lat/long issue. Why the Base layer is not working is a mystery for me. I hope other Community members can help out. 

Userlevel 4
Badge +5

Hi Freddy,

Looks like the coordset is not in the correct format. The lat & lon columns in the JSON need start with an upper case; Lon & Lat.

Regarding the base layer not being enable by default, are you up-to-date with all the hotfixes?

Hope this summary of how to implement the Maps component helps.

 

To show information in the Maps component you need to configure a few steps in Maps screen of the SF.

Step 1. Preparation

Before we begin with the configuration of the map itself, there are some prerequisites for the entity we want to use the maps for:

  • The entity needs to contain a column which categorizes the data; the mapping column.
    • This column needs to have a image combo domain.
    • The image of the element are used as the marker on the map
    • You need to have at least one element, more are useful if you have different data inside the entity like a route with a start point, destination and route.
  • The entity needs to contain a column with the longitude and latitude coordinates
    • This needs to be save in a specific JSON format: { "CoordSets": [ [ { "Lon": "5.9795099", "Lat": "52.2084904" } ] ] }
    • In case the data should visualize a line (used for routes) or polygon (used for areas) the JSON must contain multiple coordinates in the coordset: {"CoordSets":[[{"Lon":"-76.499107","Lat":"39.243073"},{"Lon":"-76.499146","Lat":"39.243053"}] ] }
    • The coordinates are not automatically retrieved by Thinkwise, so make sure you have a process in place to call an Geolocation webservice from example Google, Here, OpenMaps, Mapquest etc.
  • The entity should contain a column with the value you want to show in the popup when an location is selected.
    • This could only be plantext with only the lookuk value of the entity.
    • The popup does support HTML, so you are free to design a rich popup with forexample pictures and table structures.
  • The screentype of the entity must include a maps component

 

 

Step 2. Configuration of the entity

If the entity meets all requirements you can start with the configuration, open User Interface > Maps, find the right entity and press add.

Start with the basic information; the Linked columns and choose the correct columns.

 

Of the initial settings, only the Zoom level is mandatory, this should be a value between 1 and 16 and indicates how much the map is zoomed in when it is first opened.

The initial Latitude & Longitude are used to center the map on a location if there is no data in the selection to show on the map. This happens rarely, but can have the following reasons:

  • The entity does not contain any data
  • A filter has been applied which does not return any data
  • The available data has no value for the Data mapping column and/or Latitude and Longitude column

 

 

Step 3. Configuring the base layer

Every map needs at least one base layer, because this base layer functions as a representation of our planet. Without a base layer, the locations are shown on a white background.

 

For the base layers, you can use external providers such as Google, Here maps, Openmaps, Mapquest or your own favourite map provider.

The only requirement is that the map can be accessed using a so-called X,Y,Z url.  The XYZ source is used for tile data that is accessed through URLs that include a zoom level and tile grid x/y coordinates. For example: https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}

 

Step 4. Setup overlays (Optional)

Overlays is the only optional step. This can be used to add extra information on top of the base layer.

Think of No Fly Zones, Environmental Zones, Traffic Information.

 

 

Step 5. Define the data mappings

With the configuration of the data mapping you control how the data from the entity is visualised on the map.

You specify how specific records should be visualised based on the elements of the Data mapping column. It is important to note that the records will only be visualised if the column show data mapping is set to true.

Standard locations are of the Geometric type Marker. For these records the image linked to the element will be shown directly on the map, of course based on the coordinates.

If a record contains data for a route, it will be configured according to the type Line, in which case you have the possibility to specify additional settings like the color.



​​​​

Userlevel 5
Badge +16

@Mark Jongeling I have a marker. @Kevin Horst the coordinates problem was indeed the capital L in Lon and Lan….  but however the base layer doesn't active itself by default. What could be the problem? 

 

Userlevel 4
Badge +5

Hi Freddy,

Good to hear the markers now show up at the right location!
The base layer is a strange one, to me it looks like you configured it all right. Show base layer is set to true.

Which base layer is shown in the GUI is provided by the i_ui_map_base_layer view.
Could you check if your base layer is included?

Userlevel 6
Badge +10

@Freddy @Kevin Horst The Base layer issue is a known bug in the latest Universal GUI releases (2022.1.12 and 2022.1.13). We raised it as TCP and it is supposed to be fixed with Universal GUI 2022.1.14.

NOTE: it does not appear to happen if the Maps component is the Main screen in a Document, we only have the issue for the Maps that are displayed as Detail tabs.

Userlevel 5
Badge +16

Hi Freddy,

Good to hear the markers now show up at the right location!
The base layer is a strange one, to me it looks like you configured it all right. Show base layer is set to true.

Which base layer is shown in the GUI is provided by the i_ui_map_base_layer view.
Could you check if your base layer is included?

Yes it is included.. 

@Arie V I guess I have to wait for 2022.1.14 to have a resolution. Thanks for the update. 

Userlevel 5
Badge +16

@Kevin Horst when is the planned release of .14?  We have an event next week where we want to showcase this. And the map as main screen is not an option. 

Userlevel 6
Badge +10

@Freddy FYI: this Maps issue does not occur in Universal GUI 2022.1.11, so perhaps you can use that one for your event next week.

Userlevel 5
Badge +16

@Freddy FYI: this Maps issue does not occur in Universal GUI 2022.1.11, so perhaps you can use that one for your event next week.

Thanks.. but there are some things that we're solved in .13 that we are also using. But for now it should be ok. As long as we don't refresh the App remembers the activated base layer.