示例#1
0
 public static Dictionary <string, Func <Map> > CreateList()
 {
     return(new Dictionary <string, Func <Map> >
     {
         ["OpenStreetMap"] = () => OsmSample.CreateMap(),
         ["Projected point"] = () => ProjectionSample.CreateMap(),
         ["Animated point movement"] = () => AnimatedPointsSample.CreateMap(),
         ["Stacked labels"] = () => StackedLabelsSample.CreateMap(),
         ["Info"] = () => InfoLayersSample.CreateMap(),
         ["Tiled request to WMS"] = () => TiledWmsSample.CreateMap(),
         ["TMS"] = () => TmsSample.CreateMap(),
         ["Bing maps"] = () => BingSample.CreateMap(),
         ["WMS-C"] = () => WmscSample.CreateMap(),
         ["Symbols in World Units"] = () => SymbolsInWorldUnitsSample.CreateMap(),
         ["WMTS"] = () => WmtsSample.CreateMap(),
         ["Labels"] = () => LabelsSample.CreateMap(),
         ["Rasterizing Layer"] = () => RasterizingLayerSample.CreateMap(),
         ["Polygons"] = () => PolygonSample.CreateMap(),
         ["LineStrings"] = () => LineStringSample.CreateMap(),
         ["Points"] = () => PointsSample.CreateMap(),
         ["Various Layers"] = () => VariousSample.CreateMap(),
         ["Empty Map"] = () => EmptyMapSample.CreateMap(),
         ["Mutating triangle"] = () => MutatingTriangleSample.CreateMap()
     });
 }
示例#2
0
 public static Dictionary <string, Func <Map> > CreateList()
 {
     return(new Dictionary <string, Func <Map> >
     {
         ["OpenStreetMap"] = () => OsmSample.CreateMap(),
         ["Simple Points"] = () => PointsSample.CreateMap(),
         ["Simple LineStrings"] = () => LineStringSample.CreateMap(),
         ["Simple Polygons"] = () => PolygonSample.CreateMap(),
         ["Various"] = () => VariousSample.CreateMap(),
         ["Labels"] = () => LabelsSample.CreateMap(),
         ["Center on location"] = () => CenterOnLocationSample.CreateMap(),
         ["Projected point"] = () => ProjectionSample.CreateMap(),
         ["Stacked labels"] = () => StackedLabelsSample.CreateMap(),
         ["Symbols"] = () => SymbolsSample.CreateMap(),
         ["Info"] = () => InfoLayersSample.CreateMap(),
         ["MbTiles"] = () => MbTilesSample.CreateMap(),
         ["Animated point movement"] = () => AnimatedPointsSample.CreateMap(),
         ["TileSources: WMTS"] = () => WmtsSample.CreateMap(),
         ["TileSources: Bing maps"] = () => BingSample.CreateMap(),
         ["TileSources: TMS"] = () => TmsSample.CreateMap(),
         // todo: find a WMS-C that is stil in service ["TileSources: WMS-C"] = () => WmscSample.CreateMap(),
         ["TileSources: regular WMS"] = () => TiledWmsSample.CreateMap(),
         ["Rasterizing Layer"] = () => RasterizingLayerSample.CreateMap(),
         ["Empty Map"] = () => EmptyMapSample.CreateMap(),
         ["Mutating triangle"] = () => MutatingTriangleSample.CreateMap(),
         ["Symbols in World Units"] = () => SymbolsInWorldUnitsSample.CreateMap(),
     });
 }
示例#3
0
 private static MapControl CreateMap(CGRect bounds)
 {
     return(new MapControl(bounds)
     {
         Map = InfoLayersSample.CreateMap(),
         UnSnapRotationDegrees = 30,
         ReSnapRotationDegrees = 5
     });
 }
示例#4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            DeployMbTilesFile();
            MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid;

            var mapControl = FindViewById <MapControl>(Resource.Id.mapcontrol);

            mapControl.Map       = InfoLayersSample.CreateMap();
            mapControl.Map.Info += MapOnInfo;
        }
示例#5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            DeployMbTilesFile();
            MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid;

            var mapControl = FindViewById <MapControl>(Resource.Id.mapcontrol);

            mapControl.Map       = InfoLayersSample.CreateMap();
            mapControl.Map.Info += MapOnInfo;
            mapControl.Map.Viewport.ViewportChanged += ViewportOnViewportChanged;
            mapControl.AllowPinchRotation            = true;

            FindViewById <RelativeLayout>(Resource.Id.mainLayout).AddView(_popup = CreatePopup());
        }
示例#6
0
        protected override void OnCreate(global::Android.OS.Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            // Hack to tell the platform independent samples where the files can be found on Android.
            MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid;
            MbTilesHelper.DeployMbTilesFile(s => File.Create(Path.Combine(MbTilesLocationOnAndroid, s)));

            _mapControl           = FindViewById <MapControl>(Resource.Id.mapcontrol);
            _mapControl.Map       = InfoLayersSample.CreateMap();
            _mapControl.Map.Info += MapOnInfo;
            _mapControl.Map.Viewport.ViewportChanged += ViewportOnViewportChanged;
            _mapControl.RotationLock          = false;
            _mapControl.UnSnapRotationDegrees = 30;
            _mapControl.ReSnapRotationDegrees = 5;

            FindViewById <RelativeLayout>(Resource.Id.mainLayout).AddView(_popup = CreatePopup());
        }
示例#7
0
        protected override void OnCreate(Android.OS.Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_main);

            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            // Hack to tell the platform independent samples where the files can be found on Android.
            MbTilesSample.MbTilesLocation = MbTilesLocationOnAndroid;
            MbTilesHelper.DeployMbTilesFile(s => File.Create(System.IO.Path.Combine(MbTilesLocationOnAndroid, s)));

            _mapControl                       = FindViewById <MapControl>(Resource.Id.mapcontrol);
            _mapControl.Map                   = InfoLayersSample.CreateMap();
            _mapControl.Info                 += MapOnInfo;
            _mapControl.RotationLock          = false;
            _mapControl.UnSnapRotationDegrees = 30;
            _mapControl.ReSnapRotationDegrees = 5;

            FindViewById <RelativeLayout>(Resource.Id.mainLayout).AddView(_popup = CreatePopup());
        }