Difference between revisions of "Map View (Xamarin)"
(→Customizable tile source for Bing road maps {{Version/XamarinSince|4.5}}) |
(→Customizable tile source for Bing road maps {{Version/XamarinSince|4.5}}) |
||
Line 22: | Line 22: | ||
By default (namely <code>BingRoadTilesUrl</code> is unspecified), the following URL pattern is used. | By default (namely <code>BingRoadTilesUrl</code> is unspecified), the following URL pattern is used. | ||
− | <code><nowiki>http://ak.dynamic.t{s}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt=en-US&it=G,L&shading=hill&og=2290&n=z&token={k}</nowiki></code> | + | <code><nowiki>http://ak.dynamic.t{s}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt=en-US&amp;it=G,L&amp;shading=hill&amp;og=2290&amp;n=z&amp;token={k}</nowiki></code> |
In this case, all tiles are delivered in English since that's requested through <code><nowiki>mkt=en-US</nowiki></code>. Please refer to [https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes supported culture codes] from Microsoft when you want tiles in other languages. | In this case, all tiles are delivered in English since that's requested through <code><nowiki>mkt=en-US</nowiki></code>. Please refer to [https://learn.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes supported culture codes] from Microsoft when you want tiles in other languages. | ||
− | {{Hint|Microsoft also provides a Chinese server URL pattern<br/> <code><nowiki>https://dynamic.t{s}.tiles.ditu.live.com/comp/ch/{quadkey}?mkt=zh-CN&it=G,L&ur=CN&og=804&n=z&token={k}</nowiki></code>.<br/> Just for clarification, it is also possible to request map tiles in Chinese using the default URL pattern as long as the correct culture code is specified, namely <code><nowiki>mkt=zh-Hans</nowiki></code>, <code><nowiki>mkt=zh-Hant</nowiki></code> or <code><nowiki>mkt=zh-CN</nowiki></code>.<br/> But the dedicated one might deliver tiles that comply more to the local laws. Please choose one that you see fit.}} | + | {{Hint|Microsoft also provides a Chinese server URL pattern<br/> <code><nowiki>https://dynamic.t{s}.tiles.ditu.live.com/comp/ch/{quadkey}?mkt=zh-CN&amp;it=G,L&amp;ur=CN&amp;og=804&amp;n=z&amp;token={k}</nowiki></code>.<br/> Just for clarification, it is also possible to request map tiles in Chinese using the default URL pattern as long as the correct culture code is specified, namely <code><nowiki>mkt=zh-Hans</nowiki></code>, <code><nowiki>mkt=zh-Hant</nowiki></code> or <code><nowiki>mkt=zh-CN</nowiki></code>.<br/> But the dedicated one might deliver tiles that comply more to the local laws. Please choose one that you see fit.}} |
[[Category:Client|Map View (Xamarin)]] | [[Category:Client|Map View (Xamarin)]] |
Revision as of 11:41, 18 September 2023
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.
Contents
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.
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.
Customizable tile source for Bing road maps
Bing maps support many parameters and offer multiple servers to deliver map tiles. UBIK® allows the user to customize the BingRoadTilesUrl
in a profile to achieve the following.
- Use different servers to get the more reliable and suitable tiles service if necessary;
- Specify a language/culture in which the tiles should be delivered;
- Or even request different types of Bing map tiles.
By default (namely BingRoadTilesUrl
is unspecified), the following URL pattern is used.
http://ak.dynamic.t{s}.tiles.virtualearth.net/comp/ch/{quadkey}?mkt=en-US&it=G,L&shading=hill&og=2290&n=z&token={k}
In this case, all tiles are delivered in English since that's requested through mkt=en-US
. Please refer to supported culture codes from Microsoft when you want tiles in other languages.
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
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 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.
Show on map
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.)
Unlike 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. |