Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            var path       = NSBundle.PathForResourceAbsolute("GeoJSON_Sample", "geojson", NibBundle.BundlePath);
            var url        = NSUrl.CreateFileUrl(path, null);
            var jsonParser = new GMUGeoJSONParser(url);

            jsonParser.Parse();
            var renderer = new GMUGeometryRenderer(mapView, jsonParser.Features);

            renderer.Render();
        }
Exemplo n.º 2
0
        public override void LoadView()
        {
            var camera = CameraPosition.FromCamera(latitude: -28, longitude: 137, 4);

            mapView   = MapView.FromCamera(frame: CGRect.Empty, camera: camera);
            this.View = mapView;

            var path = NSBundle.PathForResourceAbsolute("GeoJSON_sample", "json", NibBundle.BundlePath);
            var url  = NSUrl.CreateFileUrl(path, null);

            geoJsonParser = new GMUGeoJSONParser(url);
            geoJsonParser.Parse();

            renderer = new GMUGeometryRenderer(map: mapView, geometries: geoJsonParser.Features);

            renderer.Render();
        }
        public override void LoadView()
        {
            var camera = CameraPosition.FromCamera(latitude: 37.4220, longitude: -122.0841, 17);

            mapView   = MapView.FromCamera(frame: CGRect.Empty, camera: camera);
            this.View = mapView;

            var path = NSBundle.PathForResourceAbsolute("KML_Sample", "kml", NibBundle.BundlePath);
            var url  = NSUrl.CreateFileUrl(path, null);

            kmlParser = new GMUKMLParser(url);
            kmlParser.Parse();

            renderer = new GMUGeometryRenderer(map: mapView,
                                               geometries: kmlParser.Placemarks,
                                               styles: kmlParser.Styles);

            renderer.Render();
        }