Products
Professional Services
Demos and Downloads
Help and Support
Products
Professional Services
Demos and Downloads
Help and Support
This is an old revision of the document!
This static class exposes a number of helpful methods when dealing with extents.
GetScreenDistanceBetweenTwoWorldPoints
GetScreenDistanceBetweenTwoWorldPoints
GetWorldDistanceBetweenTwoScreenPoints
GetWorldDistanceBetweenTwoScreenPoints
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.
None
Return Value
worldExtent
worldPoint
screenWidth
screenHeight
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.
None
Return Value
worldExtent
centerFeature
screenWidth
screenHeight
This method returns an adjusted extent centered on a point.
None
Return Value
worldExtent
screenX
screenY
screenWidth
screenHeight
N/A
N/A
Return Value
This API gets the BoundingBox of a group of Features.
N/A
Return Value
features
This API gets the BoundingBox of a group of BaseShapes.
N/A
Return Value
shapes
This method returns an adjusted extent based on the ratio of the screen width and height.
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
worldExtent
screenWidth
screenHeight
N/A
N/A
Return Value
This method returns the current scale.
None
Return Value
worldExtent
screenWidth
worldExtentUnit
This method returns the current scale.
None
Return Value
worldExtent
screenWidth
worldExtentUnit
dpi
This method returns the number of pixels between two world points.
None
Return Value
worldExtent
worldPoint1
worldPoint2
screenWidth
screenHeight
This method returns the number of pixels between two features.
None
Return Value
worldExtent
worldPointFeature1
worldPointFeature2
screenWidth
screenHeight
N/A
N/A
Return Value
This method returns the distance in world units between two screen points.
N/A
Return Value
worldExtent
screenPoint1X
screenPoint1Y
screenPoint2X
screenPoint2Y
screenWidth
screenHeight
worldExtentUnit
distanceUnit
This method returns the distance in world units between two screen points.
None
Return Value
worldExtent
screenPoint1
screenPoint2
screenWidth
screenHeight
worldExtentUnit
distanceUnit
This method returns a panned extent.
worldExtent
direction
percentage
This method returns a panned extent.
worldExtent
degree
percentage
This method returns a RectangleShape by resize parameters.
N/A
Return Value
sourceExtent
sourceScreenWidth
targetScreenWidth
targetScreenHeight
mapUnit
resizeType
This method returns an extent that is snapped to a zoom level in the provided zoom level set.
None
Return Value
worldExtent
worldExtentUnit
screenWidth
screenHeight
zoomLevelSet
This method returns screen coordinates from world coordinates.
None
Return Value
worldExtent
worldPointFeature
screenWidth
screenHeight
This method returns screen coordinates from world coordinates.
None
Return Value
worldExtent
worldPoint
screenWidth
screenHeight
This method returns Rectangle in screen coordinates from RectangleShape in world coordinates.
None
Return Value
worldExtent
targetExtent
currentExtentWidth
currentExtentHeight
This method returns screen coordinates from world coordinates.
None
Return Value
worldExtent
worldX
worldY
screenWidth
screenHeight
N/A
N/A
Return Value
This method returns world coordinates from screen coordinates.
None
Return Value
worldExtent
screenX
screenY
screenWidth
screenHeight
This method returns world coordinates from screen coordinates.
None
Return Value
worldExtent
screenPoint
screenWidth
screenHeight
This method returns a new extent that is zoomed in by the percentage provided.
None
Return Value
worldExtent
percentage
This method returns an extent that is centered and zoomed in.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
worldExtent
percentage
screenX
screenY
screenWidth
screenHeight
This method returns an extent that is centered and zoomed in.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
worldExtent
percentage
worldPoint
screenWidth
screenHeight
This method returns an extent that is centered and zoomed.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
worldExtent
percentage
centerFeature
screenWidth
screenHeight
This method returns an extent that is keeping the offsetScreenPoint constant and zoomed.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to afterward call GetDrawingExtent.
Return Value
worldExtent
screenWidth
screenHeight
offsetScreenPoint
percentage
This method returns a new extent that is zoomed out by the percentage provided.
None
Return Value
worldExtent
percentage
This method returns an extent that is centered and zoomed out.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
worldExtent
percentage
centerFeature
screenWidth
screenHeight
This method returns an extent that is centered and zoomed out.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
worldExtent
percentage
worldPoint
screenWidth
screenHeight
This method returns an extent that is centered and zoomed out.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterward.
Return Value
worldExtent
percentage
screenX
screenY
screenWidth
screenHeight
This method returns an extent that is keeping the offsetScreenPoint constant and zoomed.
The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to afterward call GetDrawingExtent.
Return Value
worldExtent
screenWidth
screenHeight
offsetScreenPoint
percentage
This method returns a extent that has been zoomed into a certain scale.
None
Return Value
targetScale
worldExtent
worldExtentUnit
screenWidth
screenHeight
This method returns a extent that has been zoomed into a certain scale.
None
Return Value
targetScale
worldExtent
worldExtentUnit
screenWidth
screenHeight
offsetScreenPoint
N/A
N/A
Return Value
N/A
N/A
Return Value
N/A
N/A
Return Value
N/A
N/A
Return Value
newWidth
newTileExtent
mapUnit
dpi
N/A
N/A
Return Value
worldExtent
screenWidth
worldExtentUnit
dpi
N/A
N/A
Return Value
N/A
N/A
Return Value
scale
zoomLevelScales
minimumScale
maximumScale
N/A
N/A
Return Value
worldExtent
screenWidth
worldExtentUnit
N/A
N/A
Return Value
originalBitmap
destRect
srcRect
N/A
N/A
N/A
Return Value
8501 Wade Blvd Ste 550
Frisco, TX 75034
United States
sales@thinkgeo.com
1-785-727-4133
Online Store
- Desktop
WPF
WinForms
- Web
WebAPI HTML5/JavaScript
ASP.NET MVC
WebForms with AJAX
- Mobile
iOS
Android™
World Street
World Imagery
Routing
Geocoding
Reverse Geocoding
Elevation
Quick Start Guides
Documentation
Blogs
Discussion Forums
Customer Portal
About Us
News & Announcemets
Privacy Policy
Copyright 2003-2017 ThinkGeo LLC.
All rights reserved.