Example #1
0
        public override void SetOptions(ExtentOptions extentOptions)
        {
            RangeAroundTransformTileProviderOptions options = extentOptions as RangeAroundTransformTileProviderOptions;

            if (options != null)
            {
                SetOptions(options.targetTransform, options.visibleBuffer, options.disposeBuffer);
            }
            else
            {
                Debug.LogError("ExtentOptions type mismatch : Using " + extentOptions.GetType() + " to set extent of type " + this.GetType());
            }
        }
Example #2
0
        /// <summary>
        /// Sets the extent type and parameters to control the maps extent.
        /// </summary>
        /// <param name="extentType">Extent type.</param>
        /// <param name="extentOptions">Extent options.</param>
        public virtual void SetExtent(MapExtentType extentType, ExtentOptions extentOptions = null)
        {
            _options.extentOptions.extentType = extentType;

            if (extentOptions != null)
            {
                var currentOptions = _options.extentOptions.GetTileProviderOptions();
                if (currentOptions.GetType() == extentOptions.GetType())
                {
                    currentOptions = extentOptions;
                }
            }
            OnTileProviderChanged();
        }
Example #3
0
        public override void SetOptions(ExtentOptions extentOptions)
        {
            CameraBoundsTileProviderOptions options = extentOptions as CameraBoundsTileProviderOptions;

            if (options != null)
            {
                camera        = options.camera;
                visibleBuffer = options.visibleBuffer;
                disposeBuffer = options.disposeBuffer;
            }
            else
            {
                Debug.LogError("ExtentOptions type mismatch : Using " + extentOptions.GetType() + " to set extent of type " + this.GetType());
            }
        }
Example #4
0
        public override void SetOptions(ExtentOptions extentOptions)
        {
            RangeTileProviderOptions options = extentOptions as RangeTileProviderOptions;

            if (options != null)
            {
                west  = options.west;
                north = options.north;
                east  = options.east;
                south = options.south;
            }
            else
            {
                Debug.LogError("ExtentOptions type mismatch : Using " + extentOptions.GetType() + " to set extent of type " + this.GetType());
            }
        }
Example #5
0
        public ExtentOptions GetTileProviderOptions()
        {
            ExtentOptions options = new ExtentOptions();

            switch (extentType)
            {
            case MapExtentType.CameraBounds:
                options = defaultExtents.cameraBoundsOptions;
                break;

            case MapExtentType.RangeAroundCenter:
                options = defaultExtents.rangeAroundCenterOptions;
                break;

            case MapExtentType.RangeAroundTransform:
                options = defaultExtents.rangeAroundTransformOptions;
                break;

            default:
                break;
            }
            return(options);
        }
Example #6
0
 /// <summary>
 /// Set parameters for current extent calculator strategy.
 /// </summary>
 /// <param name="extentOptions">Parameters to control the map extent.</param>
 public virtual void SetExtentOptions(ExtentOptions extentOptions)
 {
     _options.extentOptions.GetTileProviderOptions().SetOptions(extentOptions);
     _options.extentOptions.defaultExtents.HasChanged = true;
 }
Example #7
0
 public virtual void SetOptions(ExtentOptions extentOptions)
 {
 }