Jump to: navigation, search

Difference between revisions of "Map View (Xamarin)"


Line 43: Line 43:
 
When you execute the NavigateToMapPageCommand from a context object (e.g. ContentViewModel, ContentPageViewModel, ContentListItemViewModel, etc.), the map view will be opened with that context object. This includes:
 
When you execute the NavigateToMapPageCommand from a context object (e.g. ContentViewModel, ContentPageViewModel, ContentListItemViewModel, etc.), the map view will be opened with that context object. This includes:
 
* Entering necessary POI groups, buildings or building levels so that the context object is visible on the map;
 
* Entering necessary POI groups, buildings or building levels so that the context object is visible on the map;
* Taking the geo location of the context object as the current location and, therefore, centering the map around it;
+
* Centering the map around the context object;
 
* Selecting the POI for the context object automatically. (Once you start interacting with the map by e.g. entering another building, the selected states will most likely change.)
 
* Selecting the POI for the context object automatically. (Once you start interacting with the map by e.g. entering another building, the selected states will most likely change.)
  

Revision as of 10:16, 17 December 2021

Similar to the map view on our other UBIK® clients, the Xamarin version displays Points of Interest (POIs) and other objects with Geo information on world maps.

Base Map

A world map is always displayed as the base layer of the map view. Depending on the "Map Type" setting (in the "AR" tab/category), different maps are used.

  • Road: from Open Street map;
  • Satellite: from Microsoft Bing map.

Some basic UI options commonly seen in map applications are available as well. For example, an indicator for the current device position, buttons to center around the current position, etc.

UBIK Map Content

On the base map, UBIK® can display different kinds of content with Geo information.

Geo POIs

For each object carrying Geo coordinates, UBIK® displays a map pin on the map accordingly. The object's icon (if any) is also included in the map pin.

Like in the POI view, you can select or deselect POIs. The options available on selected POIs are described in section "Interact with POIs".

Map Overlays

Map Overlay
Map Overlay

Sometimes more detailed maps are needed for specific and smaller regions, e.g. a factory. Map overlays are such image based maps that are displayed on top of the base map. The placement of an overlay is determined by certain configurations on the overlay object.

Here's an article on how to Create Image Map Overlays.

Map Shapes

Map Shape
Map Shape

Map shapes can be considered as map overlays defined in a different data format.

  • Like map overlays, they are displayed on top of the base map;
  • Unlike map overlays, their display content as well as placements on the map are defined in shapefiles. Details can be found here.

Group, Building & Level

The way Geo POIs can be grouped and displayed accordingly in the map view is exactly the same as in the POI view. In addition, other types of map content like map overlays & shapes can also belong to groups, buildings or levels. The displaying of them follows the same rules.

Context Object

When you execute the NavigateToMapPageCommand from a context object (e.g. ContentViewModel, ContentPageViewModel, ContentListItemViewModel, etc.), the map view will be opened with that context object. This includes:

  • Entering necessary POI groups, buildings or building levels so that the context object is visible on the map;
  • Centering the map around the context object;
  • Selecting the POI for the context object automatically. (Once you start interacting with the map by e.g. entering another building, the selected states will most likely change.)
IC Attention.pngUnlike executing the NavigateToMapPageCommand from a place without a context object, doing so with one will additionally check the validity of that object, namely if it at least has geo information. If not, the command will be disabled.