Printable versions
This Page
All Pages
PDF (2.0MB)

Index

Component
GpsViewNET

Class
Map

Properties
Position
OffsetX
OffsetY
Zoom
Rotation
Background
UpdateInterval
ImageFormat

Layers
MapLib

Events
OnObjectDown
OnObjectUp
OnMouseDown
OnMouseUp
OnMouseMove
OnDraw
OnDrawComplete

Methods
Open
Merge
Close
Update
UpdateAsync
CancelUpdate

NewMapShape
NewMapShapeFile
NewIcon
NewLine
NewRectangle
NewEllipse
NewLabel
Delete

GetByID
GetByIndex
GetByPosition
SetIndex
GetIndex

ActiveLayer
ActiveMapData

Position2Point
Point2Position

ZoomByBoundingBox

GetImageStream

Map.ZoomByBoundingBox GpsTools v2.30 and later

Zooms and positions the Map so that the area specified by the arguments is maximized within the Map. The coordinates given as arguments represents the upper left corner and the lower right corner of the a rectangle area to zoom.

The typical usage of this method is to zoom a specific shape or to zoom an area given by a mouse movement.

Below is an example on how to zoom a shape using it's bounding box in C#.

// Get the DatumGridTemplate from the shapefile
GpsToolsNET.Position template = shapeFile.DatumGridTemplate;
					
// Get the bounding box from the shapefile. 
double dMinX, dMaxX, dMinY, dMaxY, dMinM, dMaxM, dMinZ, dMaxZ;
shape.GetBoundingBox(out dMinX, out dMaxX, out dMinY, out dMaxY, out dMinZ, out dMaxZ, out dMinM, out dMaxM);
					
// Zoom using the bounding box coordinates. 
map1.ZoomByBoundingBox(dMinX, dMaxX, dMinY, dMaxY, template);
map1.Update();	


Syntax
objMap.ZoomByBoundingBox(GpsViewNET.Point upperLeft, GpsViewNET.Point lowerRight);
objMap.ZoomByBoundingBox(GpsToolsNET.Position upperLeft upperLeft, GpsToolsNET.Position lowerRight lowerRight);
objMap.ZoomByBoundingBox(double minX, double maxX, double minY, double maxY, GpsToolsNET.Position DatumGridTemplate);

Part Type Description
object GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.



100% managed code
© 2016 Franson Technology AB, All rights reserved, Contact | | Affiliate | Login