Skip to content

ZoomLevelSet

Namespace: ThinkGeo.Core

This class represents a collection of ZoomLevels.

public class ZoomLevelSet

Inheritance ObjectZoomLevelSet

Remarks:

This class represents a collection of ZoomLevels. Each ZoomLevel has a different scale and can store Styles that determine how InternalFeatures draw.

Properties

Name

This property gets and sets the name for the ZoomSet.

public string Name { get; set; }

Property Value

String

Remarks:

The name is user defined. It is useful to set, as it may be used for higher level components such as legends, etc.

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

ZoomLevel01

This property gets the ZoomLevel for Level01.

public ZoomLevel ZoomLevel01 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel02

This property gets the ZoomLevel for Level02.

public ZoomLevel ZoomLevel02 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel03

This property gets the ZoomLevel for Level03.

public ZoomLevel ZoomLevel03 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel04

This property gets the ZoomLevel for Level04.

public ZoomLevel ZoomLevel04 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel05

This property gets the ZoomLevel for Level05.

public ZoomLevel ZoomLevel05 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel06

This property gets the ZoomLevel for Level06.

public ZoomLevel ZoomLevel06 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel07

This property gets the ZoomLevel for Level07.

public ZoomLevel ZoomLevel07 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel08

This property gets the ZoomLevel for Level08.

public ZoomLevel ZoomLevel08 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel09

This property gets the ZoomLevel for Level09.

public ZoomLevel ZoomLevel09 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel10

This property gets the ZoomLevel for Level10.

public ZoomLevel ZoomLevel10 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel11

This property gets the ZoomLevel for Level11.

public ZoomLevel ZoomLevel11 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel12

This property gets the ZoomLevel for Level12.

public ZoomLevel ZoomLevel12 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel13

This property gets the ZoomLevel for Level13.

public ZoomLevel ZoomLevel13 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel14

This property gets the ZoomLevel for Level14.

public ZoomLevel ZoomLevel14 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel15

This property gets the ZoomLevel for Level15.

public ZoomLevel ZoomLevel15 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel16

This property gets the ZoomLevel for Level16.

public ZoomLevel ZoomLevel16 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel17

This property gets the ZoomLevel for Level17.

public ZoomLevel ZoomLevel17 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel18

This property gets the ZoomLevel for Level18.

public ZoomLevel ZoomLevel18 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel19

This property gets the ZoomLevel for Level19.

public ZoomLevel ZoomLevel19 { get; }

Property Value

ZoomLevel

Remarks:

None

ZoomLevel20

This property gets the ZoomLevel for Level20.

public ZoomLevel ZoomLevel20 { get; }

Property Value

ZoomLevel

Remarks:

None

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(Int32)

public ZoomLevelSet(int tileSize)

Parameters

tileSize Int32

ZoomLevelSet(Int32, RectangleShape)

public ZoomLevelSet(int tileSize, RectangleShape maxExtent)

Parameters

tileSize Int32

maxExtent RectangleShape

ZoomLevelSet(Int32, RectangleShape, GeographyUnit)

public ZoomLevelSet(int tileSize, RectangleShape maxExtent, GeographyUnit maxExtentUnit)

Parameters

tileSize Int32

maxExtent RectangleShape

maxExtentUnit GeographyUnit

Methods

Load(String)

public void Load(string styleJsonPath)

Parameters

styleJsonPath String

Load(Uri)

public void Load(Uri styleJsonUri)

Parameters

styleJsonUri Uri

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 RectangleShape
This parameter is a world extent.

screenWidth Double
This parameter is the width of the map in pixels.

mapUnit GeographyUnit
This 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, Single)

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 RectangleShape
This parameter is a world extent.

screenWidth Double
This parameter is the width of the map in pixels.

mapUnit GeographyUnit
This parameter is the unit of the map.

dpi Single
This 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(RectangleShape, Double, GeographyUnit, Single)

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 RectangleShape
This parameter is a world extent.

screenWidth Double
This parameter is the width of the view in pixels.

mapUnit GeographyUnit
This parameter is the unit of the map.

dpi Single
This 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.

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 RectangleShape
This parameter is a world extent.

screenWidth Double
This parameter is the width of the view in pixels.

mapUnit GeographyUnit
This 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.

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.

GetLowerZoomLevelScale(Double, ZoomLevelSet)

ZoomToScale in, the result is less than input

public static double GetLowerZoomLevelScale(double currentScale, ZoomLevelSet zoomLevelSet)

Parameters

currentScale Double

zoomLevelSet ZoomLevelSet

Returns

Double

GetHigherZoomLevelScale(Double, ZoomLevelSet)

ZoomToScale out, the result is greater than input

public static double GetHigherZoomLevelScale(double currentScale, ZoomLevelSet zoomLevelSet)

Parameters

currentScale Double

zoomLevelSet ZoomLevelSet

Returns

Double

GetDefaultZoomLevelByIndex(Int32)

Get the Default zoomlevel by the given index.

public ZoomLevel GetDefaultZoomLevelByIndex(int zoomLevelIndex)

Parameters

zoomLevelIndex Int32
zoomlevel Index Based on 1

Returns

ZoomLevel
returns ZoomLevel01 if the input zoomLevelIndex is 1, etc.