Class ZoomLevelSet
This class represents a collection of ZoomLevels.
public class ZoomLevelSet
- Inheritance
-
ZoomLevelSet
- Derived
- Inherited Members
Remarks
This class represents a collection of ZoomLevels. Each ZoomLevel has a different scale and can store Styles that determine how InternalFeatures draw.
Constructors
ZoomLevelSet()
This is the default constructor.
public ZoomLevelSet()
Remarks
This constructor is where we set the default scales for each ZoomLevel. If you inherit from this class to create your own custom ZoomSet, then you should not call the base constructor if you want to supply your own custom ZoomLevels.
ZoomLevelSet(int)
public ZoomLevelSet(int tileSize)
Parameters
tileSize
int
ZoomLevelSet(int, RectangleShape)
public ZoomLevelSet(int tileSize, RectangleShape maxExtent)
Parameters
tileSize
intmaxExtent
RectangleShape
ZoomLevelSet(int, RectangleShape, GeographyUnit)
public ZoomLevelSet(int tileSize, RectangleShape maxExtent, GeographyUnit maxExtentUnit)
Parameters
tileSize
intmaxExtent
RectangleShapemaxExtentUnit
GeographyUnit
Properties
CustomZoomLevels
This property gets the custom zoom levels from the zoomLevelSet.
public Collection<ZoomLevel> CustomZoomLevels { get; }
Property Value
- Collection<ZoomLevel>
This property gets the custom zoom levels from the zoomLevelSet.
Remarks
None
MaxExtent
public RectangleShape MaxExtent { get; set; }
Property Value
Name
This property gets and sets the name for the ZoomSet.
public string Name { get; set; }
Property Value
Remarks
The name is user defined. It is useful to set, as it may be used for higher level components such as legends, etc.
TileSize
public int TileSize { get; set; }
Property Value
ZoomLevel01
This property gets the ZoomLevel for Level01.
public ZoomLevel ZoomLevel01 { get; }
Property Value
Remarks
None
ZoomLevel02
This property gets the ZoomLevel for Level02.
public ZoomLevel ZoomLevel02 { get; }
Property Value
Remarks
None
ZoomLevel03
This property gets the ZoomLevel for Level03.
public ZoomLevel ZoomLevel03 { get; }
Property Value
Remarks
None
ZoomLevel04
This property gets the ZoomLevel for Level04.
public ZoomLevel ZoomLevel04 { get; }
Property Value
Remarks
None
ZoomLevel05
This property gets the ZoomLevel for Level05.
public ZoomLevel ZoomLevel05 { get; }
Property Value
Remarks
None
ZoomLevel06
This property gets the ZoomLevel for Level06.
public ZoomLevel ZoomLevel06 { get; }
Property Value
Remarks
None
ZoomLevel07
This property gets the ZoomLevel for Level07.
public ZoomLevel ZoomLevel07 { get; }
Property Value
Remarks
None
ZoomLevel08
This property gets the ZoomLevel for Level08.
public ZoomLevel ZoomLevel08 { get; }
Property Value
Remarks
None
ZoomLevel09
This property gets the ZoomLevel for Level09.
public ZoomLevel ZoomLevel09 { get; }
Property Value
Remarks
None
ZoomLevel10
This property gets the ZoomLevel for Level10.
public ZoomLevel ZoomLevel10 { get; }
Property Value
Remarks
None
ZoomLevel11
This property gets the ZoomLevel for Level11.
public ZoomLevel ZoomLevel11 { get; }
Property Value
Remarks
None
ZoomLevel12
This property gets the ZoomLevel for Level12.
public ZoomLevel ZoomLevel12 { get; }
Property Value
Remarks
None
ZoomLevel13
This property gets the ZoomLevel for Level13.
public ZoomLevel ZoomLevel13 { get; }
Property Value
Remarks
None
ZoomLevel14
This property gets the ZoomLevel for Level14.
public ZoomLevel ZoomLevel14 { get; }
Property Value
Remarks
None
ZoomLevel15
This property gets the ZoomLevel for Level15.
public ZoomLevel ZoomLevel15 { get; }
Property Value
Remarks
None
ZoomLevel16
This property gets the ZoomLevel for Level16.
public ZoomLevel ZoomLevel16 { get; }
Property Value
Remarks
None
ZoomLevel17
This property gets the ZoomLevel for Level17.
public ZoomLevel ZoomLevel17 { get; }
Property Value
Remarks
None
ZoomLevel18
This property gets the ZoomLevel for Level18.
public ZoomLevel ZoomLevel18 { get; }
Property Value
Remarks
None
ZoomLevel19
This property gets the ZoomLevel for Level19.
public ZoomLevel ZoomLevel19 { get; }
Property Value
Remarks
None
ZoomLevel20
This property gets the ZoomLevel for Level20.
public ZoomLevel ZoomLevel20 { get; }
Property Value
Remarks
None
Methods
GetDefaultZoomLevelByIndex(int)
Get the Default zoomlevel by the given index.
public ZoomLevel GetDefaultZoomLevelByIndex(int zoomLevelIndex)
Parameters
zoomLevelIndex
intzoomlevel Index Based on 1
Returns
- ZoomLevel
returns ZoomLevel01 if the input zoomLevelIndex is 1, etc.
GetHigherZoomLevelScale(double, ZoomLevelSet)
ZoomToScale out, the result is greater than input
public static double GetHigherZoomLevelScale(double currentScale, ZoomLevelSet zoomLevelSet)
Parameters
currentScale
doublezoomLevelSet
ZoomLevelSet
Returns
GetLowerZoomLevelScale(double, ZoomLevelSet)
ZoomToScale in, the result is less than input
public static double GetLowerZoomLevelScale(double currentScale, ZoomLevelSet zoomLevelSet)
Parameters
currentScale
doublezoomLevelSet
ZoomLevelSet
Returns
GetZoomLevel(RectangleShape, double, GeographyUnit)
This method returns the active ZoomLevel based on an extent, a map unit and a screen width.
public ZoomLevel GetZoomLevel(RectangleShape extent, double screenWidth, GeographyUnit mapUnit)
Parameters
extent
RectangleShapeThis parameter is a world extent.
screenWidth
doubleThis parameter is the width of the map in pixels.
mapUnit
GeographyUnitThis parameter is the unit of the map.
Returns
- ZoomLevel
This method returns the active ZoomLevel based on an extent, a map unit and a screen width.
GetZoomLevel(RectangleShape, double, GeographyUnit, float)
This method returns the active ZoomLevel based on an extent, a map unit and a screen width.
public ZoomLevel GetZoomLevel(RectangleShape extent, double screenWidth, GeographyUnit mapUnit, float dpi)
Parameters
extent
RectangleShapeThis parameter is a world extent.
screenWidth
doubleThis parameter is the width of the map in pixels.
mapUnit
GeographyUnitThis parameter is the unit of the map.
dpi
floatThis parameter is the dpi of the extent.
Returns
- ZoomLevel
This method returns the active ZoomLevel based on an extent, a map unit and a screen width.
GetZoomLevelForDrawing(double)
public ZoomLevel GetZoomLevelForDrawing(double currentScale)
Parameters
currentScale
double
Returns
GetZoomLevelForDrawing(RectangleShape, double, GeographyUnit)
This method returns the active ZoomLevel based on an extent, a map unit and a view width.
public ZoomLevel GetZoomLevelForDrawing(RectangleShape extent, double screenWidth, GeographyUnit mapUnit)
Parameters
extent
RectangleShapeThis parameter is a world extent.
screenWidth
doubleThis parameter is the width of the view in pixels.
mapUnit
GeographyUnitThis parameter is the unit of the map.
Returns
- ZoomLevel
This method returns the active ZoomLevel based on an extent, map unit and a view width.
GetZoomLevelForDrawing(RectangleShape, double, GeographyUnit, float)
This method returns the active ZoomLevel based on an extent, a map unit and a view width.
public ZoomLevel GetZoomLevelForDrawing(RectangleShape extent, double screenWidth, GeographyUnit mapUnit, float dpi)
Parameters
extent
RectangleShapeThis parameter is a world extent.
screenWidth
doubleThis parameter is the width of the view in pixels.
mapUnit
GeographyUnitThis parameter is the unit of the map.
dpi
floatThis parameter is the dpi of the extent.
Returns
- ZoomLevel
This method returns the active ZoomLevel based on an extent, map unit and a view width.
GetZoomLevels()
This method return all of the zoomLevels in the zoomLevelSet.
public Collection<ZoomLevel> GetZoomLevels()
Returns
- Collection<ZoomLevel>
This method return all of the zoomlevels in the zoomLevelSet.
Remarks
None.
Load(string)
public void Load(string styleJsonPath)
Parameters
styleJsonPath
string
Load(Uri)
public void Load(Uri styleJsonUri)
Parameters
styleJsonUri
Uri