Example #1
0
        private void Start()
        {
            var tileLoadingService = new TileLoadingService(this, mapServiceWaitTime);
            var mapViewContext     = new MapViewContext(cut, tileResolution, tileLoadingService);

            var mapTileUpdater = new MapTileUpdater(mapViewContext);

            var converter     = new MapPixelConverter();
            var pixelLocation = new PixelLocation()
            {
                X = converter.LonToX(longitude), Z = converter.LatToZ(latitude)
            };

            var mapLevelFactory = new MapLevelFactory(mapViewContext, mapTileUpdater, tileRefObject, gameObject);

            mapLevelSpowner = new MapLevelSpowner(mapLevelFactory);
            mapLevelSpowner.SpownMapLevel(pixelLocation, zoomLevel);



            collider = GetComponent <Collider>();
            InputMaster.Instance.AddPointDragEventHandler(collider, OnPointerDrag);
            InputMaster.Instance.AddWheelScrollEventHandler(collider, OnScrollWheel);
        }
Example #2
0
 public MapViewContext(int cut, int tileResolution, TileLoadingService mapService)
 {
     Cut            = cut;
     TileResolution = tileResolution;
     MapService     = mapService;
 }