예제 #1
0
        public void OnShow()
        {
            RemoveMapView();

            _map = new AppleMapsView(CreateMapOptions());
            _map.Show(AppleMapsDemoUtils.RectTransformToScreenSpace(rect));

            Debug.Log(_map.MapType);

            // Point annotations
            AddPointAnnotation();
            AppleMapsDemoUtils.AddRandomPointAnnotations(_map);

            // Circles
            AddCircle();
            AppleMapsDemoUtils.AddRandomPointCircles(_map);

            // Polylines & Polygons
            AddPolyline();
            AddPolygon();

            // Image overlay
            AddImageOverlay();

            SetMapListeners();
        }
예제 #2
0
 public void OnUpdateMapOptions()
 {
     if (_map != null)
     {
         Debug.Log("Current map: " + _map + ". Updating...");
         AppleMapsDemoUtils.UpdateMapOptions(_map);
     }
 }
예제 #3
0
 void AddImageOverlay()
 {
     _imageOverlay = AppleMapsDemoUtils.CreateImageOverlay();
     _map.AddOverlay(_imageOverlay);
 }
예제 #4
0
 void AddPolygon()
 {
     _polygon = AppleMapsDemoUtils.CreateInitialPolygon();
     _map.AddOverlay(_polygon);
 }
예제 #5
0
 void AddPolyline()
 {
     _polyline = AppleMapsDemoUtils.CreateInitialPolyline();
     _map.AddOverlay(_polyline);
 }
예제 #6
0
 void AddPointAnnotation()
 {
     _pointAnnotation = AppleMapsDemoUtils.CreateInitialPointAnnotation();
     _map.AddAnnotation(_pointAnnotation);
 }
예제 #7
0
 void AddCircle()
 {
     _circle = AppleMapsDemoUtils.CreateInitialCircle();
     _map.AddOverlay(_circle);
 }