C# Class SharpMap.Map

Inheritance: IDisposable
Datei anzeigen Open project: jumpinjackie/fdotoolbox Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Disposes the map object

FindLayer ( string layername ) : IEnumerable

Returns an enumerable for all layers containing the search parameter in the LayerName property

GetExtents ( ) : SharpMap.Geometries.BoundingBox

Gets the extents of the map based on the extents of all the layers in the layers collection

GetLayerByName ( string name ) : SharpMap.Layers.ILayer

Returns a layer by its name

GetMap ( ) : System.Drawing.Image

Renders the map to an image

ImageToWorld ( System p ) : SharpMap.Geometries.Point

Converts a point from image coordinates to world coordinates based on the current zoom, center and mapsize.

Map ( ) : System

Initializes a new map

Map ( System size ) : System

Initializes a new map

WorldToImage ( SharpMap p ) : System.Drawing.PointF

Converts a point from world coordinates to image coordinates based on the current zoom, center and mapsize.

ZoomToBox ( SharpMap bbox ) : void

Zooms the map to fit a bounding box

NOTE: If the aspect ratio of the box and the aspect ratio of the mapsize isn't the same, the resulting map-envelope will be adjusted so that it contains the bounding box, thus making the resulting envelope larger!

ZoomToExtents ( ) : void

Zooms to the extents of all layers

Method Details

Dispose() public method

Disposes the map object
public Dispose ( ) : void
return void

FindLayer() public method

Returns an enumerable for all layers containing the search parameter in the LayerName property
public FindLayer ( string layername ) : IEnumerable
layername string Search parameter
return IEnumerable

GetExtents() public method

Gets the extents of the map based on the extents of all the layers in the layers collection
public GetExtents ( ) : SharpMap.Geometries.BoundingBox
return SharpMap.Geometries.BoundingBox

GetLayerByName() public method

Returns a layer by its name
public GetLayerByName ( string name ) : SharpMap.Layers.ILayer
name string Name of layer
return SharpMap.Layers.ILayer

GetMap() public method

Renders the map to an image
public GetMap ( ) : System.Drawing.Image
return System.Drawing.Image

ImageToWorld() public method

Converts a point from image coordinates to world coordinates based on the current zoom, center and mapsize.
public ImageToWorld ( System p ) : SharpMap.Geometries.Point
p System Point in image coordinates
return SharpMap.Geometries.Point

Map() public method

Initializes a new map
public Map ( ) : System
return System

Map() public method

Initializes a new map
public Map ( System size ) : System
size System Size of map in pixels
return System

WorldToImage() public method

Converts a point from world coordinates to image coordinates based on the current zoom, center and mapsize.
public WorldToImage ( SharpMap p ) : System.Drawing.PointF
p SharpMap Point in world coordinates
return System.Drawing.PointF

ZoomToBox() public method

Zooms the map to fit a bounding box
NOTE: If the aspect ratio of the box and the aspect ratio of the mapsize isn't the same, the resulting map-envelope will be adjusted so that it contains the bounding box, thus making the resulting envelope larger!
public ZoomToBox ( SharpMap bbox ) : void
bbox SharpMap
return void

ZoomToExtents() public method

Zooms to the extents of all layers
public ZoomToExtents ( ) : void
return void