From a8b9603067cedc47539c41c17cb21077c351e35d Mon Sep 17 00:00:00 2001
From: chanywa Before you create a If the consent request returns
Tizen.Maps.MapView.Scrolled
: Scroll gesture is detected over the widget.Tizen.Maps.MapView.ZoomChanged
: Zoom gesture is detected over the widget.Tizen.Maps.MapView.TwoFingerZoomed
: Two-finger zoom gesture is detected over the widget.Tizen.Maps.MapView.Clicked
: Click gesture is detected over the widget.Tizen.Maps.MapView.DoubleClicked
: Double-click gesture is detected over the widget.Tizen.Maps.MapView.TwoFingerPressed
: Two-finger press gesture is detected over the widget.Tizen.Maps.MapView.Rotated
: Rotation gesture is detected over the widget.Tizen.Maps.MapView.TwoFingerClicked
: Two-finger click gesture is detected over the widget.Tizen.Maps.MapView.TwoFingerRotated
: Two-finger rotation gesture is detected over the widget.Tizen.Maps.MapView.LongPressed
: Long-press gesture is detected over the widget.Tizen.Maps.MapService
instance, make sure that the device user has consented to allow the map provider to use their location information. Depending on a map provider, a UI window to get user consent can be shown on the screen.false
, creating a Tizen.Maps.MapService
instance fails.Tizen.Maps.MapService
class instance using the provider name and provider key issued by the map provider:
-bool isConsented = await MapService.RequestUserConsent("MAPS_PROVIDER_NAME"); -Log.Info("Tizen.Maps", $"User consent for MAPS_PROVIDER_NAME = {isConsented}"); +var maps = new MapService("MAPS_PROVIDER_NAME", "Your-Maps-Provider-Key");-
Before you use the Tizen.Maps namespace, create a Tizen.Maps.MapService
object instance.
Set the provider name and provider key issued by the map provider:
+If the consent request returns false
, you cannot use most of the methods and properties of the Tizen.Maps namespace.
-var maps = new MapService("MAPS_PROVIDER_NAME", "Your-Maps-Provider-Key"); +bool isConsented = await maps.RequestUserConsent(); +Log.Info("Tizen.Maps", $"User consent = {isConsented}");
try { - bool isconsented = await MapService.RequestUserConsent("MAP_PROVIDER_NAME"); - if (isconsented) - { - maps = new MapService("MAP_PROVIDER_NAME", "Your-Map-Provider-Key"); - window = new Window("Test"); - mapview = new MapView(window, maps); + window = new Window("Test"); + mapview = new MapView(window, maps); - mapview.Resize(w, h - 100); - mapview.Move(0, 100); - mapview.Show(); - } + mapview.Resize(w, h - 100); + mapview.Move(0, 100); + mapview.Show(); } catch (Exception e) { @@ -604,9 +598,9 @@ mapview.TrafficEnabled = true;-
-mapview.ScalebarEnabled = true; +mapview.ScaleBarEnabled = true;