Table of Contents

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

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
Parameters

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
Parameters

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
Parameters

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
Parameters

Pan(PanDirection,Int32)

Update the CurrentExtent by using a panning operation.

Remarks

None

Return Value
Parameters

Pan(Single,Int32)

This method updates the CurrentExtent by using a panning operation.

Remarks

None

Return Value
Parameters

ToScreenCoordinate(Double,Double,Single,Single)

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

Remarks

None

Return Value
Parameters

ToScreenCoordinate(PointShape,Single,Single)

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

Remarks

None

Return Value
Parameters

ToScreenCoordinate(Feature,Single,Single)

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

Remarks

None

Return Value
Parameters

ToWorldCoordinate(Single,Single,Single,Single)

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

Remarks

None

Return Value
Parameters

ToWorldCoordinate(ScreenPointF,Single,Single)

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

Remarks

None

Return Value
Parameters

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
Parameters

ZoomToScale(Double,GeographyUnit,Single,Single)

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

Remarks

None

Return Value
Parameters

FindStaticFeatureLayer(String)

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

Remarks

N/A

Return Value
Parameters

FindStaticRasterLayer(String)

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

Remarks

N/A

Return Value
Parameters

FindDynamicFeatureLayer(String)

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

Remarks

N/A

Return Value
Parameters

FindDynamicRasterLayer(String)

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

Remarks

N/A

Return Value
Parameters

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
Parameters

OpenAllLayers()

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

Remarks

N/A

Return Value
Parameters

CloseAllLayers()

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

Remarks

N/A

Return Value
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
Parameters

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
Parameters

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
Parameters

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
Parameters

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
Parameters

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
Parameters

GetCurrentScale(Single,GeographyUnit)

Get the current Scale responding to the CurrentExtent.

Remarks

N/A

Return Value
Parameters

Draw(IEnumerable<Layer>,GeoImage,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

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
Parameters

DrawStaticLayers(GeoImage,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

DrawDynamicLayers(GeoImage,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

DrawAdornmentLayers(GeoImage,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

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
Parameters

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
Parameters

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
Parameters

Draw(IEnumerable<Layer>,Bitmap,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

DrawStaticLayers(Bitmap,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

DrawDynamicLayers(Bitmap,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

DrawAdornmentLayers(Bitmap,GeographyUnit)

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

Remarks

N/A

Return Value
Parameters

ZoomIn(Int32)

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

Remarks

None

Return Value
Parameters

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
Parameters

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
Parameters

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
Parameters

ToString()

N/A

Remarks

N/A

Return Value
Parameters

Equals(Object)

N/A

Remarks

N/A

Return Value
Parameters

GetHashCode()

N/A

Remarks

N/A

Return Value
Parameters

GetType()

N/A

Remarks

N/A

Return Value
Parameters

ZoomOut(RectangleShape,Int32)

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

Remarks

None

Return Value
Parameters

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
Parameters

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
Parameters

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
Parameters

Pan(RectangleShape,PanDirection,Int32)

This method returns a panned extent.

Remarks

None

Return Value
Parameters

Pan(RectangleShape,Single,Int32)

This method returns a panned extent.

Remarks

None

Return Value
Parameters

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

This method returns screen coordinates from world coordinates.

Remarks

None

Return Value
Parameters

ToScreenCoordinate(RectangleShape,PointShape,Single,Single)

This method returns screen coordinates from world coordinates.

Remarks

None

Return Value
Parameters

ToScreenCoordinate(RectangleShape,Feature,Single,Single)

This method returns screen coordinates from world coordinates.

Remarks

None

Return Value
Parameters

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

This method returns world coordinates from screen coordinates.

Remarks

None

Return Value
Parameters

ToWorldCoordinate(RectangleShape,ScreenPointF,Single,Single)

This method returns world coordinates from screen coordinates.

Remarks

None

Return Value
Parameters

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
Parameters

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

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

Remarks

None

Return Value
Parameters

GetVersion()

Get the current MapSuiteCore.dll file version.

Remarks

N/A

Return Value
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
Parameters

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
Parameters

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
Parameters

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
Parameters

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
Parameters

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

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

Remarks

None

Return Value
Parameters

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

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

Remarks

None

Return Value
Parameters

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

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

Remarks

None

Return Value
Parameters

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
Parameters

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
Parameters

GetBoundingBoxOfItems(IEnumerable<BaseShape>)

This API gets the BoundingBox of a group of BaseShapes.

Remarks

N/A

Return Value
Parameters

GetBoundingBoxOfItems(IEnumerable<Feature>)

This API gets the BoundingBox of a group of Features.

Remarks

N/A

Return Value
Parameters

ZoomIn(RectangleShape,Int32)

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

Remarks

None

Return Value
Parameters

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
Parameters

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

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

Remarks

None

Return Value
Parameters

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
Parameters

Protected Methods

OnAdornmentLayersDrawing(AdornmentLayersDrawingEventArgs)

This event is raised before AdornmentLayers are drawn.

Remarks

N/A

Return Value
Parameters

OnAdornmentLayersDrawn(AdornmentLayersDrawnEventArgs)

This event is raised after AdornmentLayers are drawn.

Remarks

N/A

Return Value
Parameters

OnAdornmentLayerDrawing(AdornmentLayerDrawingEventArgs)

This event is raised before an AdornmentLayer is drawn.

Remarks

N/A

Return Value
Parameters

OnAdornmentLayerDrawn(AdornmentLayerDrawnEventArgs)

This event is raised after an AdornmentLayer is drawn.

Remarks

N/A

Return Value
Parameters

OnLayersDrawing(LayersDrawingEventArgs)

This event is raised before Layers are drawn.

Remarks

N/A

Return Value
Parameters

OnLayersDrawn(LayersDrawnEventArgs)

This event is raised after Layers are drawn.

Remarks

N/A

Return Value
Parameters

OnLayerDrawing(LayerDrawingEventArgs)

This event is raised before a Layer is drawn.

Remarks

N/A

Return Value
Parameters

OnLayerDrawn(LayerDrawnEventArgs)

This event is raised after a Layer is drawn.

Remarks

N/A

Return Value
Parameters

Finalize()

N/A

Remarks

N/A

Return Value
Parameters

MemberwiseClone()

N/A

Remarks

N/A

Return Value
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

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