Skip to content

Instantly share code, notes, and snippets.

@amay077
Last active September 8, 2017 10:20
Show Gist options
  • Select an option

  • Save amay077/5539948 to your computer and use it in GitHub Desktop.

Select an option

Save amay077/5539948 to your computer and use it in GitHub Desktop.
Xamarin Studio でコンポーネントを更新する方法 ref: http://qiita.com/amay077/items/2515dc0c01eede84bb19
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
var camera = CameraPosition.FromCamera (-37.81969, 144.966085, 4);
var mapView = MapView.FromCamera (RectangleF.Empty, camera);
var sydneyMarker = new Marker () {
Title = "Sydney",
Snippet = "Population: 4,605,992",
Position = new CLLocationCoordinate2D (-33.8683, 151.2086),
Map = mapView
};
var melbourneMarker = new Marker () {
Title = "Melbourne",
Snippet = "Population: 4,169,103",
Position = new CLLocationCoordinate2D (-37.81969, 144.966085),
Map = mapView
};
// Set the marker in Sydney to be selected
mapView.SelectedMarker = sydneyMarker;
View = mapView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment