public TCMapViewPins2() { InitializeComponent(); BindingContext = new TCMapViewPinItemsViewModel(); var position = new LatLng(Latitude, Longitude); _option = new GoogleMapOption(position); _option.Zoom = 12; mapview.Update(_option); }
public TCMapViewStackLayout2() { InitializeComponent(); var position = new LatLng(Latitude, Longitude); var option = new GoogleMapOption(position); option.Zoom = 16; option.MapType = GoogleMapType.Hybrid; mapview.Update(option); }
public TCMapViewStackLayout3() { InitializeComponent(); var position = new LatLng(Latitude, Longitude); _option = new GoogleMapOption(position); _option.Zoom = 15; _option.MapType = GoogleMapType.Satellite; mapview.Update(_option); index = 0; }
public TCMapViewAbsoluteLayout() { InitializeComponent(); var option = new GoogleMapOption(); var position = new LatLng(Latitude, Longitude); option.Center = position; option.Zoom = 15; option.MapType = GoogleMapType.Hybrid; mapview.Update(option); }
// The map is moved to the location it sets. private void UpdateLocation() { // Sets the latitude and longitude. var location = new LatLng(40.7157961, -74.0252194); var option = new GoogleMapOption { Center = location, Zoom = 12, }; mapview.Update(option); }
public void UpdateLocation() { // Sets the latitude and longitude. var location = new LatLng(40.7157961, -74.0252194); var option = new GoogleMapOption { Center = location, Zoom = 12, }; MapViewPage.UpdateLocation(option); }
public TCMapViewPins1() { InitializeComponent(); var option = new GoogleMapOption(); var position = new LatLng(Latitude, Longitude); option.Center = position; option.Zoom = 12; mapview.Update(option); var marker1 = new Marker { Position = new LatLng(40.711493, -74.011351), Description = "Westfield World Trade Center", Address = "185 Greenwich St, New York, NY 10007", }; var marker2 = new Marker { Position = new LatLng(40.689651, -74.045412), Description = "Statue of Liberty National Monument", Address = "New York, NY 10004", }; var marker3 = new Marker { Position = new LatLng(40.748368, -73.985560), Description = "Empire State Building", Address = "20 W 34th St, New York, NY 10001", }; mapview.Markers.Add(marker1); mapview.Markers.Add(marker2); mapview.Markers.Add(marker3); }
// The map is moved to the location it sets. public void UpdateLocation(GoogleMapOption googleMapOption) { mapview.Update(googleMapOption); }
public App() { tt = new Tizen.Wearable.CircularUI.Forms.GoogleMapView(); // var option = new GoogleMapOption(); tt.WidthRequest = 500; tt.HeightRequest = 500; var position = new LatLng(-27.641270, 153.049400); option = new GoogleMapOption(position); option.Zoom = 21; option.MapType = GoogleMapType.Hybrid; tt.Update(option); ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; raw.SetProvider(new SQLite3Provider_sqlite3()); raw.FreezeProvider(true); string connStr = "/opt/media/USBDriveA1/fred2.db"; // @"c:\dwn\hello.db"; var cnn = new SQLiteConnection(connStr); // var tt2 = cnn.SelectAllFrom<routes>(); route_id = cnn.SelectFrom <routes>("SELECT route_id FROM {0} where route_short_name = '" + my_route_short_name + "';"); // int ff = tt2.Count; cnn.Close(); cnn.Dispose(); UpdateGMap(null, null); // Create a timer with a ten second interval. aTimer = new System.Timers.Timer(10000); // Hook up the Elapsed event for the timer. aTimer.Elapsed += new ElapsedEventHandler(UpdateGMap); // Set the Interval to 2 seconds (2000 milliseconds). aTimer.Interval = 2000; aTimer.Enabled = true; //System.Windows.Forms.Timer timer = new Timer(); //// timer.Interval = (10 * 1000); // 10 secs //timer.Interval = (5 * 1000); // 10 secs //timer.Tick += new EventHandler(UpdateGMap); //timer.Start(); // The root page of your application MainPage = new ContentPage { Content = new StackLayout { VerticalOptions = LayoutOptions.Center, Children = { new Label { HorizontalTextAlignment = TextAlignment.Center, Text = "Welcome to Xamarin Forms!" }, tt } } }; }