User Tools

Site Tools


thinkgeo.mapsuite.core.mapengine

ThinkGeo.MapSuite.Core.MapEngine

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

This class is for generating maps.

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.MapSuite.Core.MapEngine

Members Summary

Public Constructors

MapEngine()

Create a new instance of the MapEngine.

Remarks

N/A

Parameters

Protected Constructors

Public Methods

ZoomOut(Int32)

This method will update the CurrentExtent by using the ZoomOut operation.

Remarks

None

Return Value
  • Type:Void
  • Description:None.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom.

ZoomOutToCenter(Int32,PointShape,Single,Single)

This method updates the CurrentExtent by using the ZoomOutToCenter operation.

Remarks

The CurrentExtent will be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • worldPoint
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOutToCenter(Int32,Feature,Single,Single)

This method updates the CurrentExtent by using the ZoomOutToCenter operation.

Remarks

The CurrentExtent will be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the world point Feature you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOutToCenter(Int32,Single,Single,Single,Single)

This method updates the CurrentExtent by using the ZoomOutToCenter operation.

Remarks

The CurrentExtent will be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • screenX
    • Type:Single
    • Description:This parameter is the screen X you want to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the screen Y you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

Pan(PanDirection,Int32)

Update the CurrentExtent by using a panning operation.

Remarks

None

Return Value
  • Type:Void
  • Description:None.
Parameters
  • panDirection
    • Description:This parameter is the direction you want to pan.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to pan.

Pan(Single,Int32)

This method updates the CurrentExtent by using a panning operation.

Remarks

None

Return Value
  • Type:Void
  • Description:None.
Parameters
  • degree
    • Type:Single
    • Description:This parameter is the angle in degrees in which you want to pan.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to pan.

ToScreenCoordinate(Double,Double,Single,Single)

This method returns screen coordinates from the specified world coordinates, based on the CurrentExtent.

Remarks

None

Return Value
  • Description:This method returns screen coordinates from the specified world coordinates, based on the CurrentExtent.
Parameters
  • worldX
    • Type:Double
    • Description:This parameter is the world point X you want converted to a screen point.
  • worldY
    • Type:Double
    • Description:This parameter is the world point Y you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen for the CurrentExtent.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen for the CurrentExtent.

ToScreenCoordinate(PointShape,Single,Single)

This method returns screen coordinates from the specified world coordinates, based on the CurrentExtent.

Remarks

None

Return Value
  • Description:This method returns screen coordinates from the specified world coordinates, based on the CurrentExtent.
Parameters
  • worldPoint
    • Description:This parameter is the world point you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen for the CurrentExtent.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen for the CurrentExtent.

ToScreenCoordinate(Feature,Single,Single)

This method returns screen coordinates from the specified world coordinate pointFeature, based on the CurrentExtent.

Remarks

None

Return Value
  • Description:This method returns screen coordinates from the specified world coordinate pointFeature, based on the CurrentExtent.
Parameters
  • worldPointFeature
    • Type:Feature
    • Description:This parameter is the world coordinate pointFeature you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen for the CurrentExtent.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen for the CurrentExtent.

ToWorldCoordinate(Single,Single,Single,Single)

This method returns world coordinates from screen coordinates, based on the CurrentExtent.

Remarks

None

Return Value
  • Description:This method returns world coordinates from screen coordinates, based on the CurrentExtent.
Parameters
  • screenX
    • Type:Single
    • Description:This parameter is the X of the point you want converted to world coordinates.
  • screenY
    • Type:Single
    • Description:This parameter is the Y of the point you want converted to world coordinates.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToWorldCoordinate(ScreenPointF,Single,Single)

This method returns world coordinates from screen coordinates, based on the CurrentExtent.

Remarks

None

Return Value
  • Description:This method returns world coordinates from screen coordinates, based on the CurrentExtent.
Parameters
  • screenPoint
    • Description:This parameter is the point you want converted to world coordinates.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

SnapToZoomLevel(GeographyUnit,Single,Single,ZoomLevelSet)

This method updates the CurrentExtent by snapping to a zoom level in the provided zoom level set.

Remarks

None

Return Value
  • Type:Void
  • Description:This method updates the CurrentExtent by snapping to a zoom level in the provided zoom level set.
Parameters
  • worldExtentUnit
    • Description:This parameter is the geographic unit of the CurrentExtent.
  • screenWidth
    • Type:Single
    • Description:This parameter is the screen width.
  • screenHeight
    • Type:Single
    • Description:This parameter is the screen height.
  • zoomLevelSet
    • Description:This parameter is the set of zoom levels you want to snap to.

ZoomToScale(Double,GeographyUnit,Single,Single)

This method updates the CurrentExtent by zooming to a certain scale.

Remarks

None

Return Value
  • Type:Void
  • Description:N/A
Parameters
  • targetScale
    • Type:Double
    • Description:This parameter is the scale you want to zoom into.
  • worldExtentUnit
    • Description:This parameter is the geographic unit of the CurrentExtent.
  • screenWidth
    • Type:Single
    • Description:This parameter is the screen width.
  • screenHeight
    • Type:Single
    • Description:This parameter is the screen height.

FindStaticFeatureLayer(String)

Finds a feature layer by key (specified in the “name” parameter) within the collection of StaticLayers.

Remarks

N/A

Return Value
  • Description:The corresponding FeatureLayer with the specified key in the MapControl.
Parameters
  • name
    • Type:String
    • Description:The key to find the final result feature layer.

FindStaticRasterLayer(String)

Find the raster layer by key (specified in the “name” parameter) within the collection of StaticLayers.

Remarks

N/A

Return Value
  • Description:The corresponding RasterLayer with the passing specified in the MapControl.
Parameters
  • name
    • Type:String
    • Description:The key to find the final result raster layer.

FindDynamicFeatureLayer(String)

Find the feature layer by key (specified in the “name” parameter) within the collection of DynamicLayers.

Remarks

N/A

Return Value
  • Description:The corresponding FeatureLayer with the specified key in the MapControl.
Parameters
  • name
    • Type:String
    • Description:The key to find the final result feature layer.

FindDynamicRasterLayer(String)

Find the raster layer by key (specified in the “name” parameter) within the collection of DynamicLayers.

Remarks

N/A

Return Value
  • Description:The corresponding RasterLayer with the specified key in the MapControl.
Parameters
  • name
    • Type:String
    • Description:The key to find the final result raster layer.

GetDrawingExtent(Single,Single)

This method returns an adjusted extent based on the ratio of the screen width and height.

Remarks

This function is used because the extent to draw must be the rame ratio as the screen width and height. If they are not, then the image drawn will be stretched or compressed. We always adjust the extent upwards to ensure that no matter how we adjust it, the original extent will fit within the new extent. This ensures that everything you wanted to see in the first extent is visible and maybe a bit more.

Return Value
  • Description:This method returns an adjusted extent based on the ratio of the screen width and height.
Parameters
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

OpenAllLayers()

This API allows you to open all of the layers (either static or dynamic).

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

CloseAllLayers()

This API allows you close all of the layers (either static or dynamic).

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

CenterAt(PointShape,Single,Single)

This is a function that allows you to pass a world point to center on and a height and width in screen units. The function will update the current extent by centering on the point and adjusting its ratio based on the height and width in screen coordinates.

Remarks

This API will update the CurrentExtent.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • worldPoint
    • Description:This parameter is the world point you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(Feature,Single,Single)

This is a function that allows you to pass in a feature to center on, as well as a height and width in screen units. The function will center the CurrentExtent based on the specified feature and adjust its ratio based on the height and width in screen coordinates.

Remarks

This API will update the CurrentExtent.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • centerFeature
    • Type:Feature
    • Description:This parameter is the world point feature you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(Single,Single,Single,Single)

This is a function that allows you to pass a screen point to center on and a height and width in screen units. The function will update the current extent by centering on the point and adjusting its ratio based on the height and width in screen coordinates.

Remarks

This API will update the CurrentExtent.

Return Value
  • Type:Void
  • Description:N/A
Parameters
  • screenX
    • Type:Single
    • Description:This parameter is the X coordinate on the screen to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the Y coordinate on the screen to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetScreenDistanceBetweenTwoWorldPoints(PointShape,PointShape,Single,Single)

This method returns the number of pixels between two world points using the CurrentExtent as reference.

Remarks

None

Return Value
  • Type:Single
  • Description:This method returns the number of pixels between two world points.
Parameters
  • worldPoint1
    • Description:This parameter is the first point – the one you want to measure from.
  • worldPoint2
    • Description:This parameter is the second point – the one you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetScreenDistanceBetweenTwoWorldPoints(Feature,Feature,Single,Single)

This method returns the number of pixels between two world points using the CurrentExtent as reference.

Remarks

None

Return Value
  • Type:Single
  • Description:This method returns the number of pixels between two world points.
Parameters
  • worldPointFeature1
    • Type:Feature
    • Description:This parameter is the first pointFeture – the one you want to measure from.
  • worldPointFeature2
    • Type:Feature
    • Description:This parameter is the second pointFeature – the one you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetWorldDistanceBetweenTwoScreenPoints(ScreenPointF,ScreenPointF,Single,Single,GeographyUnit,DistanceUnit)

This method returns the distance in world units between two screen points by using the CurrentExtent as a reference.

Remarks

None

Return Value
  • Type:Double
  • Description:This method returns the distance in world units between two screen points.
Parameters
  • screenPoint1
    • Description:This is the screen point you want to measure from.
  • screenPoint2
    • Description:This is the screen point you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.
  • distanceUnit
    • Description:This is the geographic unit you want the result to show in.

GetCurrentScale(Single,GeographyUnit)

Get the current Scale responding to the CurrentExtent.

Remarks

N/A

Return Value
  • Type:Double
  • Description:The calculated scale based on the CurrentExtent.
Parameters
  • screenWidth
    • Type:Single
    • Description:This parameter specifies the screen width responding to the CurrentExtent.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

Draw(IEnumerable<Layer>,GeoImage,GeographyUnit)

Draw a group of layers on the specified “background” image.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the target layers on the specified “background” image.
Parameters
  • layers
    • Type:IEnumerable<Layer>
    • Description:This parameter specifies the target layers to be drawn.
  • image
    • Type:GeoImage
    • Description:This parameter specifies the “background” image of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

Draw(IEnumerable<Layer>,Int32,Int32,GeographyUnit)

Draw a group of layers and return a new image with the specified width and height.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the target layers based on the specified width and height.
Parameters
  • layers
    • Type:IEnumerable<Layer>
    • Description:This parameter specifies the target layers to be drawn.
  • width
    • Type:Int32
    • Description:This parameter specifies the width of the returning image.
  • height
    • Type:Int32
    • Description:This parameter specifies the height of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawStaticLayers(GeoImage,GeographyUnit)

Draw a group of static layers on the specified “background” image.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the group of static layers on the specified “background” image.
Parameters
  • image
    • Type:GeoImage
    • Description:This parameter specifies the “background” image of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawDynamicLayers(GeoImage,GeographyUnit)

Draw a group of dynamic layers on the specified “background” image.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the group of dynamic layers on the specified “background” image.
Parameters
  • image
    • Type:GeoImage
    • Description:This parameter specifies the “background” image of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawAdornmentLayers(GeoImage,GeographyUnit)

Draw a group of AdornmentLayers on the specified “background” image.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the group of AdornmentLayers on the specified “background” image.
Parameters
  • image
    • Type:GeoImage
    • Description:This parameter specifies the “background” image of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawStaticLayers(Int32,Int32,GeographyUnit)

Draw a group of static layers and return a new image with the specified width and height.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the group of static layers based on the specified width and height.
Parameters
  • width
    • Type:Int32
    • Description:This parameter specifies the width of the returning image.
  • height
    • Type:Int32
    • Description:This parameter specifies the height of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawDynamicLayers(Int32,Int32,GeographyUnit)

Draw a group of dynamic layers and return a new image with the specified width and height.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the group of dynamic layers based on the specified width and height.
Parameters
  • width
    • Type:Int32
    • Description:This parameter specifies the width of the returning image.
  • height
    • Type:Int32
    • Description:This parameter specifies the height of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawAdornmentLayers(Int32,Int32,GeographyUnit)

Draw a group of AdornmentLayers and return a new image with the specified width and height.

Remarks

N/A

Return Value
  • Type:GeoImage
  • Description:The resulting image after drawing the group of AdornmentLayers based on the specified width and height.
Parameters
  • width
    • Type:Int32
    • Description:This parameter specifies the width of the returning image.
  • height
    • Type:Int32
    • Description:This parameter specifies the height of the returning image.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

Draw(IEnumerable<Layer>,Bitmap,GeographyUnit)

Draw a group of layers on the specified “background” bitmap.

Remarks

N/A

Return Value
  • Type:Bitmap
  • Description:The resulting bitmap after drawing the target layers on the specified “background” bitmap.
Parameters
  • layers
    • Type:IEnumerable<Layer>
    • Description:This parameter specifies the target layers to be drawn.
  • gdiPlusBitmap
    • Type:Bitmap
    • Description:This parameter specifies the “background” bitmap of the returning bitmap.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawStaticLayers(Bitmap,GeographyUnit)

Draw a group of static layers on the specified “background” bitmap.

Remarks

N/A

Return Value
  • Type:Bitmap
  • Description:The resulting bitmap after drawing the group of static layers on the specified “background” bitmap.
Parameters
  • gdiPlusBitmap
    • Type:Bitmap
    • Description:This parameter specifies the “background” bitmap of the returning bitmap.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawDynamicLayers(Bitmap,GeographyUnit)

Draw a group of dynamic layers on the specified “background” bitmap.

Remarks

N/A

Return Value
  • Type:Bitmap
  • Description:The resulting bitmap after drawing the group of dynamic layers on the specified “background” bitmap.
Parameters
  • gdiPlusBitmap
    • Type:Bitmap
    • Description:This parameter specifies the “background” bitmap of the returning bitmap.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

DrawAdornmentLayers(Bitmap,GeographyUnit)

Draw a group of AdornmentLayers on the specified “background” bitmap.

Remarks

N/A

Return Value
  • Type:Bitmap
  • Description:The resulting bitmap after drawing the group of AdornmentLayers on the specified “background” bitmap.
Parameters
  • gdiPlusBitmap
    • Type:Bitmap
    • Description:This parameter specifies the “background” bitmap of the returning bitmap.
  • mapUnit
    • Description:This parameter specifies the MapUnit used in the current map.

ZoomIn(Int32)

This method updates the CurrentExtent that is zoomed in by the percentage provided.

Remarks

None

Return Value
  • Type:Void
  • Description:This method updates the CurrentExtent that is zoomed in by the percentage provided.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.

ZoomIntoCenter(Int32,PointShape,Single,Single)

This method will update the CurrentExtent by using the ZoomIntoCenter operation.

Remarks

The CurrentExtent will be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • worldPoint
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width in screen coordinates.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height in screen coordinates.

ZoomIntoCenter(Int32,Feature,Single,Single)

This method returns an extent that is centered and zoomed in.

Remarks

The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Type:Void
  • Description:This method returns an extent that is centered and zoomed in.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width in screen coordinates.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height in screen coordinates.

ZoomIntoCenter(Int32,Single,Single,Single,Single)

This method updates the CurrentExtent based on a calculated rectangle that is centered and zoomed in.

Remarks

The CurrentExtent will be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Type:Void
  • Description:None.
Parameters
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • screenX
    • Type:Single
    • Description:This parameter is the screen X you want to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the screen Y you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToString()

N/A

Remarks

N/A

Return Value
  • Type:String
  • Description:N/A
Parameters

Equals(Object)

N/A

Remarks

N/A

Return Value
  • Type:Boolean
  • Description:N/A
Parameters
  • obj
    • Type:Object
    • Description:N/A

GetHashCode()

N/A

Remarks

N/A

Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetType()

N/A

Remarks

N/A

Return Value
  • Type:Type
  • Description:N/A
Parameters

ZoomOut(RectangleShape,Int32)

This method returns a new extent that is zoomed out by the percentage provided.

Remarks

None

Return Value
  • Description:This method returns a new extent that is zoomed out by the percentage provided.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.

ZoomOutToCenter(RectangleShape,Int32,PointShape,Single,Single)

This method returns an extent that is centered and zoomed out.

Remarks

The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Description:This method returns an extent that is centered and zoomed out.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • worldPoint
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOutToCenter(RectangleShape,Int32,Feature,Single,Single)

This method returns an extent that is centered and zoomed out.

Remarks

The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Description:This method returns an extent that is centered and zoomed out.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the feature you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOutToCenter(RectangleShape,Int32,Single,Single,Single,Single)

This method returns an extent that is centered and zoomed out.

Remarks

The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Description:This method returns an extent that is centered and zoomed out.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • screenX
    • Type:Single
    • Description:This parameter is the screen X you want to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the screen Y you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

Pan(RectangleShape,PanDirection,Int32)

This method returns a panned extent.

Remarks

None

Return Value
  • Description:This method returns a panned extent.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to pan.
  • direction
    • Description:This parameter is the direction you want to pan.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to pan.

Pan(RectangleShape,Single,Int32)

This method returns a panned extent.

Remarks

None

Return Value
  • Description:This method returns a panned extent.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to pan.
  • degree
    • Type:Single
    • Description:This parameter is the angle in degrees in which you want to pan.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to pan.

ToScreenCoordinate(RectangleShape,Double,Double,Single,Single)

This method returns screen coordinates from world coordinates.

Remarks

None

Return Value
  • Description:This method returns screen coordinates from world coordinates.
Parameters
  • worldExtent
  • worldX
    • Type:Double
    • Description:This parameter is the world X you want converted to screen points.
  • worldY
    • Type:Double
    • Description:This parameter is the world Y you want converted to screen points.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToScreenCoordinate(RectangleShape,PointShape,Single,Single)

This method returns screen coordinates from world coordinates.

Remarks

None

Return Value
  • Description:This method returns screen coordinates from world coordinates.
Parameters
  • worldExtent
  • worldPoint
    • Description:This parameter is the world point you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToScreenCoordinate(RectangleShape,Feature,Single,Single)

This method returns screen coordinates from world coordinates.

Remarks

None

Return Value
  • Description:This method returns screen coordinates from world coordinates.
Parameters
  • worldExtent
  • worldPointFeature
    • Type:Feature
    • Description:This parameter is the world point feature you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToWorldCoordinate(RectangleShape,Single,Single,Single,Single)

This method returns world coordinates from screen coordinates.

Remarks

None

Return Value
  • Description:This method returns world coordinates from screen coordinates.
Parameters
  • worldExtent
  • screenX
    • Type:Single
    • Description:This parameter is the X coordinate of the point you want converted to world coordinates.
  • screenY
    • Type:Single
    • Description:This parameter is the Y coordinate of the point you want converted to world coordinates.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToWorldCoordinate(RectangleShape,ScreenPointF,Single,Single)

This method returns world coordinates from screen coordinates.

Remarks

None

Return Value
  • Description:This method returns world coordinates from screen coordinates.
Parameters
  • worldExtent
  • screenPoint
    • Description:This parameter is the screen point you want converted to a world point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

SnapToZoomLevel(RectangleShape,GeographyUnit,Single,Single,ZoomLevelSet)

This method returns an extent that is snapped to a zoom level in the provided zoom level set.

Remarks

None

Return Value
  • Description:This method returns an extent that is snapped to a zoom level in the provided zoom level set.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want snapped.
  • worldExtentUnit
    • Description:This parameter is the geographic unit of the world extent parameter.
  • screenWidth
    • Type:Single
    • Description:This parameter is the screen width.
  • screenHeight
    • Type:Single
    • Description:This parameter is the screen height.
  • zoomLevelSet
    • Description:This parameter is the set of zoom levels you want to snap to.

ZoomToScale(Double,RectangleShape,GeographyUnit,Single,Single)

This method returns a extent that has been zoomed into a certain scale.

Remarks

None

Return Value
  • Description:This method returns a extent that has been zoomed into a certain scale.
Parameters
  • targetScale
    • Type:Double
    • Description:This parameter is the scale you want to zoom into.
  • worldExtent
    • Description:This parameter is the world extent you want zoomed into the scale.
  • worldExtentUnit
    • Description:This parameter is the geographic unit of the world extent parameter.
  • screenWidth
    • Type:Single
    • Description:This parameter is the screen width.
  • screenHeight
    • Type:Single
    • Description:This parameter is the screen height.

GetVersion()

Get the current MapSuiteCore.dll file version.

Remarks

N/A

Return Value
  • Type:String
  • Description:A string representing the file version of MapSuiteCore.dll.
Parameters

LoadDataTable(Collection<Feature>,IEnumerable<String>)

This method is a static API to get information about a group of passed-in features with the specified returningColumns, in the format of a DataTable.

Remarks

N/A

Return Value
  • Type:DataTable
  • Description:A DateTable of information about those passed-in features and the returning columnNames.
Parameters
  • features
    • Type:Collection<Feature>
    • Description:This parameter specifies the target features.
  • returningColumnNames
    • Type:IEnumerable<String>
    • Description:This parameter specifies the returning columnNames for the features.

GetDrawingExtent(RectangleShape,Single,Single)

This method returns an adjusted extent based on the ratio of the screen width and height.

Remarks

This function is used because the extent to draw must be the rame ratio as the screen width and height. If they are not, then the image drawn will be stretched or compressed. We always adjust the extent upwards to ensure that no matter how we adjust it, the original extent will fit within the new extent. This ensures that everything you wanted to see in the first extent is visible and maybe a bit more. This function takes a height and width in screen coordinates, then looks at a world extent passed, and returns an adjusted world rectangle so that the ratio to height and width in screen and world coordinates match.

Return Value
  • Description:This method returns an adjusted extent based on the ratio of the screen width and height.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to adjust for drawing.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(RectangleShape,PointShape,Single,Single)

This is a static function that allows you to pass in a world rectangle, a world point to center on, and a height and width in screen units. The function will center the rectangle based on the point, then adjust the rectangle's ratio based on the height and width in screen coordinates.

Remarks

None

Return Value
  • Description:This method returns an adjusted extent centered on a point.
Parameters
  • worldExtent
    • Description:This parameter is the current extent you want to center.
  • worldPoint
    • Description:This parameter is the world point you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(RectangleShape,Feature,Single,Single)

This is a static function that allows you to pass in a world rectangle, a world point to center on, and a height and width in screen units. The function will center the rectangle based on the point, then adjust the rectangle's ratio based on the height and width in screen coordinates.

Remarks

None

Return Value
  • Description:This method returns an adjusted extent centered on a point.
Parameters
  • worldExtent
    • Description:This parameter is the current extent you want to center.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the world point feature you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(RectangleShape,Single,Single,Single,Single)

This is a static function that allows you to pass in a world rectangle, a point in screen coordinates to center on, and a height and width in screen units. The function will center the rectangle based on the screen point, then adjust the rectangle's ratio based on the height and width in screen coordinates.

Remarks

None

Return Value
  • Description:This method returns an adjusted extent centered on a point.
Parameters
  • worldExtent
    • Description:This parameter is the current extent you want to center.
  • screenX
    • Type:Single
    • Description:This parameter is the X coordinate on the screen to center to.
  • screenY
    • Type:Single
    • Description:This parameter is the Y coordinate on the screen to center to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetScreenDistanceBetweenTwoWorldPoints(RectangleShape,PointShape,PointShape,Single,Single)

This method returns the number of pixels between two world points.

Remarks

None

Return Value
  • Type:Single
  • Description:This method returns the number of pixels between two world points.
Parameters
  • worldExtent
  • worldPoint1
    • Description:This parameter is the first point – the one you want to measure from.
  • worldPoint2
    • Description:This parameter is the second point – the one you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetScreenDistanceBetweenTwoWorldPoints(RectangleShape,Feature,Feature,Single,Single)

This method returns the number of pixels between two world points.

Remarks

None

Return Value
  • Type:Single
  • Description:This method returns the number of pixels between two world points.
Parameters
  • worldExtent
  • worldPointFeature1
    • Type:Feature
    • Description:This parameter is the first point Feature – the one you want to measure from.
  • worldPointFeature2
    • Type:Feature
    • Description:This parameter is the second point Feature – the one you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetWorldDistanceBetweenTwoScreenPoints(RectangleShape,ScreenPointF,ScreenPointF,Single,Single,GeographyUnit,DistanceUnit)

This method returns the distance in world units between two screen points.

Remarks

None

Return Value
  • Type:Double
  • Description:This method returns the distance in wold units between two screen points.
Parameters
  • worldExtent
  • screenPoint1
    • Description:This is the screen point you want to measure from.
  • screenPoint2
    • Description:This is the screen point you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.
  • worldExtentUnit
    • Description:This is the geographic unit of the world extent rectangle.
  • distanceUnit
    • Description:This is the geographic unit you want the result to show in.

GetWorldDistanceBetweenTwoScreenPoints(RectangleShape,Single,Single,Single,Single,Single,Single,GeographyUnit,DistanceUnit)

This method returns the distance in wold units between two screen points.

Remarks

N/A

Return Value
  • Type:Double
  • Description:N/A
Parameters
  • worldExtent
  • screenPoint1X
    • Type:Single
    • Description:This parameter is the X of the point you want to measure from.
  • screenPoint1Y
    • Type:Single
    • Description:This parameter is the Y of the point you want to measure from.
  • screenPoint2X
    • Type:Single
    • Description:This parameter is the X of the point you want to measure to.
  • screenPoint2Y
    • Type:Single
    • Description:This parameter is the Y of the point you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.
  • worldExtentUnit
    • Description:This is the geographic unit of the world extent you passed in.
  • distanceUnit
    • Description:This is the geographic unit you want the result to show in.

GetCurrentScale(RectangleShape,Single,GeographyUnit)

This Static API is used to calculate the scale based on the specified worldExtent and its corresponding ScreenWidth and MapUnit.

Remarks

N/A

Return Value
  • Type:Double
  • Description:N/A
Parameters
  • worldExtent
    • Description:This parameter specifies the worldExtent used to calculate the current scale.
  • screenWidth
    • Type:Single
    • Description:This parameter specifies the screenWidth corresponding to the worldExtent.
  • mapUnit
    • Description:This parameter specifies the unit for the extent, the result will be different if choose DecimalDegree as Unit and Meter as Unit.

GetBoundingBoxOfItems(IEnumerable<BaseShape>)

This API gets the BoundingBox of a group of BaseShapes.

Remarks

N/A

Return Value
  • Description:The BoundingBox that contains all the shapes you passed in.
Parameters
  • shapes
    • Type:IEnumerable<BaseShape>
    • Description:The target group of BaseShapes to get the BoundingBox for.

GetBoundingBoxOfItems(IEnumerable<Feature>)

This API gets the BoundingBox of a group of Features.

Remarks

N/A

Return Value
  • Description:The BoundingBox that contains all the features you passed in.
Parameters
  • features
    • Type:IEnumerable<Feature>
    • Description:The target group of Features to get the BoundingBox for.

ZoomIn(RectangleShape,Int32)

This method returns a new extent that is zoomed in by the percentage provided.

Remarks

None

Return Value
  • Description:This method returns a new extent that is zoomed in by the percentage provided.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.

ZoomIntoCenter(RectangleShape,Int32,PointShape,Single,Single)

This method returns an extent that is centered and zoomed in.

Remarks

The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Description:This method returns an extent that is centered and zoomed in.
Parameters
  • worldExtent
    • Description:This parameter is the world extent that you want centered and zoomed.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • worldPoint
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width in screen coordinates.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height in screen coordinates.

ZoomIntoCenter(RectangleShape,Int32,Feature,Single,Single)

This method returns a new extent that is zoomed in by the percentage provided.

Remarks

None

Return Value
  • Description:This method returns a new extent that is zoomed in by the percentage provided.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the world point feature you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width in screen coordinates.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height in screen coordinates.

ZoomIntoCenter(RectangleShape,Int32,Single,Single,Single,Single)

This method returns an extent that is centered and zoomed in.

Remarks

The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.

Return Value
  • Description:This method returns an extent that is centered and zoomed in.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • screenX
    • Type:Single
    • Description:This parameter is the screen X you want to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the screen Y you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

Protected Methods

OnAdornmentLayersDrawing(AdornmentLayersDrawingEventArgs)

This event is raised before AdornmentLayers are drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnAdornmentLayersDrawn(AdornmentLayersDrawnEventArgs)

This event is raised after AdornmentLayers are drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnAdornmentLayerDrawing(AdornmentLayerDrawingEventArgs)

This event is raised before an AdornmentLayer is drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnAdornmentLayerDrawn(AdornmentLayerDrawnEventArgs)

This event is raised after an AdornmentLayer is drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnLayersDrawing(LayersDrawingEventArgs)

This event is raised before Layers are drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnLayersDrawn(LayersDrawnEventArgs)

This event is raised after Layers are drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnLayerDrawing(LayerDrawingEventArgs)

This event is raised before a Layer is drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

OnLayerDrawn(LayerDrawnEventArgs)

This event is raised after a Layer is drawn.

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

Finalize()

N/A

Remarks

N/A

Return Value
  • Type:Void
  • Description:N/A
Parameters

MemberwiseClone()

N/A

Remarks

N/A

Return Value
  • Type:Object
  • Description:N/A
Parameters

Public Properties

Canvas

Gets and sets the GeoCanvas used to draw the Layers.

Remarks

N/A

Return Value

ShowLogo

This property specifies whether the logo is shown on the Map or not.

Remarks

N/A

Return Value
  • Type:Boolean

AdornmentLayers

This property holds a collection of AdornmentLayers to be drawn on the MapEngine.

Remarks

This collection of Layers StaticLayers will be drawn when calling the DrawAdornmentLayers API.

Return Value

CurrentExtent

This property gets or sets the current extent of the MapEngine.

Remarks

The current extent is the rectangle that is currently being shown on the MapEngine.

Return Value

StaticLayers

This property holds a group of Layers to be drawn on the MapEngine.

Remarks

This collection of Layers StaticLayers will be drawn when calling the DrawStaticLayers API.

Return Value

DynamicLayers

This property holds a group of Layers to be drawn on the MapEngine.

Remarks

This collection of Layers StaticLayers will be drawn when calling the DrawDynamicLayers API.

Return Value

BackgroundFillBrush

Gets or sets the GeoBrush for the background of the MapEngine.

Remarks

N/A

Return Value

Protected Properties

Public Events

LayersDrawing This event is raised before Layers are drawn.

Remarks

N/A

Event Arguments:LayersDrawingEventArgs

LayersDrawn This event is raised after Layers are drawn.

Remarks

N/A

Event Arguments:LayersDrawnEventArgs

LayerDrawing This event is raised before a Layer is drawn.

Remarks

N/A

Event Arguments:LayerDrawingEventArgs

LayerDrawn This event is raised after a Layer is drawn.

Remarks

N/A

Event Arguments:LayerDrawnEventArgs

AdornmentLayersDrawing This event is raised before AdornmentLayers are drawn.

Remarks

N/A

Event Arguments:AdornmentLayersDrawingEventArgs

AdornmentLayersDrawn This event is raised after AdornmentLayers are drawn.

Remarks

N/A

Event Arguments:AdornmentLayersDrawnEventArgs

AdornmentLayerDrawing This event is raised before an AdornmentLayer is drawn.

Remarks

N/A

Event Arguments:AdornmentLayerDrawingEventArgs

AdornmentLayerDrawn This event is raised after an AdornmentLayer is drawn.

Remarks

N/A

Event Arguments:AdornmentLayerDrawnEventArgs

thinkgeo.mapsuite.core.mapengine.txt · Last modified: 2017/03/16 21:59 (external edit)