Table of Contents

Class ZoomLevelSet

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

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 int
maxExtent RectangleShape

ZoomLevelSet(int, RectangleShape, GeographyUnit)

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

Parameters

tileSize int
maxExtent RectangleShape
maxExtentUnit 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

RectangleShape

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.

TileSize

public int TileSize { get; set; }

Property Value

int

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

Methods

GetDefaultZoomLevelByIndex(int)

Get the Default zoomlevel by the given index.

public ZoomLevel GetDefaultZoomLevelByIndex(int zoomLevelIndex)

Parameters

zoomLevelIndex int

zoomlevel 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 double
zoomLevelSet ZoomLevelSet

Returns

double

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

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, 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 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 float

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

public ZoomLevel GetZoomLevelForDrawing(double currentScale)

Parameters

currentScale double

Returns

ZoomLevel

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.

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 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 float

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.

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