protected override async void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Used in Callout to see feature details in PopupViewer _infoIcon = await RuntimeImage.FromStreamAsync(Assets.Open("info.png")); // Used to demonstrate display of EditSummary in PopupViewer // Provides credentials to token-secured layer that has editor-tracking enabled AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(async(info) => { return(await AuthenticationManager.Current.GenerateCredentialAsync(info.ServiceUri, "user1", "user1")); }); mapView = FindViewById <MapView>(Resource.Id.mapView); mapView.GeoViewTapped += mapView_GeoViewTapped; // Webmap configured with Popup mapView.Map = new Map(new Uri("https://www.arcgis.com/home/item.html?id=d4fe39d300c24672b1821fa8450b6ae2")); popupViewer = FindViewById <UI.Controls.PopupViewer>(Resource.Id.popupViewer); scaleLine = FindViewById <UI.Controls.ScaleLine>(Resource.Id.scaleLine); scaleLine.MapView = mapView; compass = FindViewById <UI.Controls.Compass>(Resource.Id.compass); compass.GeoView = mapView; }
internal static void SetForeground(this UI.Controls.ScaleLine scaleline, NativeColor color) { #if NETFX_CORE scaleline.Foreground = new Windows.UI.Xaml.Media.SolidColorBrush(color); #else scaleline.ForegroundColor = color; #endif }
internal ScaleLine(UI.Controls.ScaleLine nativeScaleLine) { NativeScaleLine = nativeScaleLine; #if NETFX_CORE nativeScaleLine.SizeChanged += (o, e) => InvalidateMeasure(); #endif }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mapView = FindViewById <MapView>(Resource.Id.mapView); mapView.Map = new Map(Basemap.CreateStreets()); mapView.ViewpointChanged += MapView_ViewpointChanged; scaleLine = FindViewById <UI.Controls.ScaleLine>(Resource.Id.scaleLine); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mapView = FindViewById <MapView>(Resource.Id.mapView); mapView.Map = new Map(Basemap.CreateStreets()); scaleLine = FindViewById <UI.Controls.ScaleLine>(Resource.Id.scaleLine); scaleLine.MapView = mapView; compass = FindViewById <UI.Controls.Compass>(Resource.Id.compass); compass.GeoView = mapView; }