diff --git a/docs/docs/AllConstants.html b/docs/docs/AllConstants.html index f25ef57..559d81f 100644 --- a/docs/docs/AllConstants.html +++ b/docs/docs/AllConstants.html @@ -18,80 +18,70 @@

All Constants

Description -CacheImageDefHeight +DefaultCacheImageTilesHorz OSM.MapControl -

 

+

Default Width (Horizontal dimension) and Height (Vertical dimension) of cache image in number of tiles.

-CacheImageDefTilesH +DefaultCacheImageTilesVert OSM.MapControl -

Default W and H of cache image in number of tiles.

+

 

-CacheImageDefTilesV +DefaultCacheMarginSize OSM.MapControl -

 

+

Default margin that is added to cache image to hold view area, in number of tiles

-CacheImageDefWidth +DefaultLabelMargin OSM.MapControl -

Default W and H of cache image in pixels

+

Default size of margin for labels on map, in pixels

-CacheMarginSize -OSM.MapControl -

Margin that is added to cache image to hold view area, in number of tiles

- - DefaultMapMarkCaptionStyle OSM.MapControl

Default style of mapmark caption.

- + DefaultMapMarkGlyphStyle OSM.MapControl

Default style of mapmark glyph.

- + DefaultTilePathPatt OSM.TileStorage

Default pattern of tile file path.

- -EngineCapabilities -SynapseRequest + +EngineCapabilities +OSM.NetworkRequest.Synapse

Capabilities of Synapse engine

- -EngineCapabilities -WinInetRequest + +EngineCapabilities +OSM.NetworkRequest.WinInet

Capabilities of WinInet engine

- + GDI_HANDLES_LIMIT OSM.TileStorage

Default overall limit is 10k per process, choose reasonable number below this limit

- + GDI_PER_BMP OSM.TileStorage

Number of GDI handles per TBitmap

- + GDI_PER_PNG OSM.TileStorage

Number of GDI handles per TPngImage

- + HTTPProxyProto OSM.NetworkRequest

Prefix to add to proxy URLs if it only contains host:port - some URL parsers handle such inputs as proto:path

- -LabelMargin -OSM.MapControl -

Size of margin for labels on map, in pixels

- LayersAll OSM.MapControl diff --git a/docs/docs/AllFunctions.html b/docs/docs/AllFunctions.html index f946df5..df3b82b 100644 --- a/docs/docs/AllFunctions.html +++ b/docs/docs/AllFunctions.html @@ -35,12 +35,12 @@

All Functions and Procedures

GeoCoordsToMap OSM.SlippyMapUtils -

Converts geo point in degrees to map point in pixels

+

Converts geo rect in degrees to map rect in pixels

GeoCoordsToMap OSM.SlippyMapUtils -

Converts geo rect in degrees to map rect in pixels

+

Converts geo point in degrees to map point in pixels

GetScaleBarParams @@ -85,12 +85,12 @@

All Functions and Procedures

MapToGeoCoords OSM.SlippyMapUtils -

Converts map point in pixels to geo point in degrees

+

Converts map rect in pixels to geo rect in degrees

MapToGeoCoords OSM.SlippyMapUtils -

Converts map rect in pixels to geo rect in degrees

+

Converts map point in pixels to geo point in degrees

MapWidth @@ -98,18 +98,18 @@

All Functions and Procedures

Returns width of map at zoom level Zoom in pixels

-NetworkRequest -RTLInetRequest +NetworkRequest +OSM.NetworkRequest.RTL

Capabilities of RTL engine Function executing a network request.

-NetworkRequest -SynapseRequest +NetworkRequest +OSM.NetworkRequest.Synapse

Function executing a network request.

-NetworkRequest -WinInetRequest +NetworkRequest +OSM.NetworkRequest.WinInet

Function executing a network request.

diff --git a/docs/docs/AllIdentifiers.html b/docs/docs/AllIdentifiers.html index 78d5db3..22104c8 100644 --- a/docs/docs/AllIdentifiers.html +++ b/docs/docs/AllIdentifiers.html @@ -18,119 +18,109 @@

All Identifiers

Description -CacheImageDefHeight -OSM.MapControl -

 

+CalcLinDistanceInMeter +OSM.SlippyMapUtils +

Calculates distance between two geo points in meters

-CacheImageDefTilesH +DefaultCacheImageTilesHorz OSM.MapControl -

Default W and H of cache image in number of tiles.

+

Default Width (Horizontal dimension) and Height (Vertical dimension) of cache image in number of tiles.

-CacheImageDefTilesV +DefaultCacheImageTilesVert OSM.MapControl

 

-CacheImageDefWidth +DefaultCacheMarginSize OSM.MapControl -

Default W and H of cache image in pixels

+

Default margin that is added to cache image to hold view area, in number of tiles

-CacheMarginSize +DefaultLabelMargin OSM.MapControl -

Margin that is added to cache image to hold view area, in number of tiles

+

Default size of margin for labels on map, in pixels

-CalcLinDistanceInMeter -OSM.SlippyMapUtils -

Calculates distance between two geo points in meters

- - DefaultMapMarkCaptionStyle OSM.MapControl

Default style of mapmark caption.

- + DefaultMapMarkGlyphStyle OSM.MapControl

Default style of mapmark glyph.

- + DefaultTilePathPatt OSM.TileStorage

Default pattern of tile file path.

- -EngineCapabilities -SynapseRequest + +EngineCapabilities +OSM.NetworkRequest.Synapse

Capabilities of Synapse engine

- -EngineCapabilities -WinInetRequest + +EngineCapabilities +OSM.NetworkRequest.WinInet

Capabilities of WinInet engine

- + EnsureInMap OSM.SlippyMapUtils

Ensures point Pt is inside a map at zoom level Zoom, corrects values if necessary

- + EnsureInMap OSM.SlippyMapUtils

Ensures rect Rc is inside a map at zoom level Zoom, corrects values if necessary

- + GDI_HANDLES_LIMIT OSM.TileStorage

Default overall limit is 10k per process, choose reasonable number below this limit

- + GDI_PER_BMP OSM.TileStorage

Number of GDI handles per TBitmap

- + GDI_PER_PNG OSM.TileStorage

Number of GDI handles per TPngImage

- + GeoCoordsToMap OSM.SlippyMapUtils

Converts geo rect in degrees to map rect in pixels

- + GeoCoordsToMap OSM.SlippyMapUtils

Converts geo point in degrees to map point in pixels

- + GetScaleBarParams OSM.SlippyMapUtils

Calculates parameters of map scalebar according to zoom level Zoom

- + HTTPProxyProto OSM.NetworkRequest

Prefix to add to proxy URLs if it only contains host:port - some URL parsers handle such inputs as proto:path

- -InMap -OSM.SlippyMapUtils -

Checks if rect Rc is inside a map at zoom level Zoom

- InMap OSM.SlippyMapUtils

Checks if point Pt is inside a map at zoom level Zoom

-LabelMargin -OSM.MapControl -

Size of margin for labels on map, in pixels

+InMap +OSM.SlippyMapUtils +

Checks if rect Rc is inside a map at zoom level Zoom

LatitudeToMapCoord @@ -193,18 +183,18 @@

All Identifiers

Returns width of map at zoom level Zoom in pixels

-NetworkRequest -RTLInetRequest +NetworkRequest +OSM.NetworkRequest.RTL

Capabilities of RTL engine Function executing a network request.

-NetworkRequest -SynapseRequest +NetworkRequest +OSM.NetworkRequest.Synapse

Function executing a network request.

-NetworkRequest -WinInetRequest +NetworkRequest +OSM.NetworkRequest.WinInet

Function executing a network request.

@@ -415,12 +405,12 @@

All Identifiers

ToInnerCoords OSM.MapControl -

Convert absolute map coords to a point inside a viewport having given top-left point

+

Convert absolute map rect to a rect inside a viewport having given top-left point

ToInnerCoords OSM.MapControl -

Convert absolute map rect to a rect inside a viewport having given top-left point

+

Convert absolute map coords to a point inside a viewport having given top-left point

TOnDrawMapMark @@ -433,19 +423,19 @@

All Identifiers

Callback to draw an image of a single tile having number (TileHorzNum;TileVertNum) at point TopLeft on canvas Canvas.

-TOnItemNotify +TOnGetTile OSM.MapControl -

Notification of an action over a mapmark in a list

+

Callback to get an image of a single tile having number (TileHorzNum;TileVertNum).

-TOnSelectionBox +TOnItemNotify OSM.MapControl -

Callback to react on selection by mouse

+

Notification of an action over a mapmark in a list

-ToOuterCoords +TOnSelectionBox OSM.MapControl -

Convert a point inside a viewport having given top-left point to absolute map coords

+

Callback to react on selection by mouse

ToOuterCoords @@ -453,51 +443,56 @@

All Identifiers

Convert a rect inside a viewport having given top-left point to absolute map rect

+ToOuterCoords +OSM.MapControl +

Convert a point inside a viewport having given top-left point to absolute map coords

+ + ToTileBoundary OSM.SlippyMapUtils

Align absolute map rect to tile boundaries

- + ToTileHeightGreater OSM.SlippyMapUtils

Ceil vertical map coord to tile size

- + ToTileHeightLesser OSM.SlippyMapUtils

Floor vertical map coord to tile size

- + ToTileWidthGreater OSM.SlippyMapUtils

Ceil horizontal map coord to tile size

- + ToTileWidthLesser OSM.SlippyMapUtils

Floor horizontal map coord to tile size

- + TTile OSM.SlippyMapUtils

Properties of a map tile

- + TTileObjectCache OSM.TileStorage

Abstract object cache class indexed by tiles with fixed capacity organised as queue.

- + TTileStorage OSM.TileStorage

Class that encapsulates memory and file cache of tile images.

- + TTileStorageOption OSM.TileStorage

Flags for TTileStorage

- + TTileStorageOptions OSM.TileStorage

 

diff --git a/docs/docs/AllTypes.html b/docs/docs/AllTypes.html index 49dd78d..845b4b8 100644 --- a/docs/docs/AllTypes.html +++ b/docs/docs/AllTypes.html @@ -103,21 +103,26 @@

All Types

Callback to draw an image of a single tile having number (TileHorzNum;TileVertNum) at point TopLeft on canvas Canvas.

+TOnGetTile +OSM.MapControl +

Callback to get an image of a single tile having number (TileHorzNum;TileVertNum).

+ + TOnItemNotify OSM.MapControl

Notification of an action over a mapmark in a list

- + TOnSelectionBox OSM.MapControl

Callback to react on selection by mouse

- + TTileStorageOption OSM.TileStorage

Flags for TTileStorage

- + TTileStorageOptions OSM.TileStorage

 

diff --git a/docs/docs/AllUnits.html b/docs/docs/AllUnits.html index f9b43d9..1692f0b 100644 --- a/docs/docs/AllUnits.html +++ b/docs/docs/AllUnits.html @@ -25,24 +25,24 @@

All Units

Generic (no real network implementation) classes and declarations for requesting OSM tile images from network.

-OSM.SlippyMapUtils -

OSM map types & functions.

+OSM.NetworkRequest.RTL +

Implements blocking HTTP request with HTTP class from RTL.

-OSM.TileStorage -

OSM tile images cache.

+OSM.NetworkRequest.Synapse +

Implements blocking HTTP request with Synapse framework.

-RTLInetRequest -

Implements blocking HTTP request with HTTP class from RTL.

+OSM.NetworkRequest.WinInet +

Implements blocking HTTP request with WinInet.

-SynapseRequest -

Implements blocking HTTP request with Synapse framework.

+OSM.SlippyMapUtils +

OSM map types & functions.

-WinInetRequest -

Implements blocking HTTP request with WinInet.

+OSM.TileStorage +

OSM tile images cache.


Generated by PasDoc 0.15.0. diff --git a/docs/docs/OSM.MapControl.TMapControl.html b/docs/docs/OSM.MapControl.TMapControl.html index 7b61d8c..83ba8a6 100644 --- a/docs/docs/OSM.MapControl.TMapControl.html +++ b/docs/docs/OSM.MapControl.TMapControl.html @@ -118,6 +118,18 @@

Description

Public procedure ZoomToFit; + +Public +procedure SetCacheImageProperties(TilesHorz, TilesVert, MarginSize: Cardinal); + + +Public +function SaveToBitmap(const SaveRect: TRect; DrawOptions: TMapOptions; DrawMapMarks: Boolean): TBitmap; overload; + + +Public +function SaveToBitmap(DrawOptions: TMapOptions; DrawMapMarks: Boolean): TBitmap; overload; +

Properties

@@ -155,12 +167,20 @@

Description

- + + + + + + + + + @@ -368,14 +388,7 @@

Methods

Publicproperty ViewRect: TRect read ViewAreaRect;property LabelMargin: Cardinal read FLabelMargin write SetLabelMargin;
Publicproperty ViewRect: TRect read ViewAreaRect;
Public property VisibleLayers: TMapLayers read FVisibleLayers write SetVisibleLayers;
Publicproperty OnGetTile: TOnGetTile read FOnGetTile write FOnGetTile;
Public property OnDrawTile: TOnDrawTile read FOnDrawTile write FOnDrawTile;

-Set zoom level to new value and reposition to given point

-
Parameters
-
-
Value
-
- new zoom value
-
MapBindPt
-
- point in map coords that must keep its position within view
-
+Set zoom level to new value and reposition to given point

@@ -408,6 +421,62 @@
Parameters
Zoom to fill view area as much as possible

+ + + + + + +
Publicprocedure SetCacheImageProperties(TilesHorz, TilesVert, MarginSize: Cardinal);
+

+Set properties of cache image and rebuild it

+
+ + + + + + +
Publicfunction SaveToBitmap(const SaveRect: TRect; DrawOptions: TMapOptions; DrawMapMarks: Boolean): TBitmap; overload;
+

+Export map fragment as bitmap.

+
Parameters
+
+
SaveRect
+
- rect in map coords to export
+
DrawOptions
+
- drawing options
+
DrawMapMarks
+
- draw mapmarks or not
+
+
Exceptions raised
+
+
Exception
+
if a tile is unavailable
+
+
+ + + + + + +
Publicfunction SaveToBitmap(DrawOptions: TMapOptions; DrawMapMarks: Boolean): TBitmap; overload;
+

+Export whole map as bitmap.

+
Parameters
+
+
DrawOptions
+
- drawing options
+
DrawMapMarks
+
- draw mapmarks or not
+
+
Exceptions raised
+
+
Exception
+
if a tile is unavailable
+
+

Properties

@@ -492,6 +561,16 @@

Properties

+ + + +
Publicproperty LabelMargin: Cardinal read FLabelMargin write SetLabelMargin;
+

+Size of margin for labels on map, in pixels

+
+ + + - + - + + + +
Public property ViewRect: TRect read ViewAreaRect;
@@ -512,11 +591,23 @@

Properties

+ + + +
Publicproperty OnGetTile: TOnGetTile read FOnGetTile write FOnGetTile;
+

+Callback to get an image of a single tile having number (TileHorzNum;TileVertNum). Must return bitmap of a tile or Nil if it's not available at the moment.
Called when map tile must be drawn. Usually you have to assign this callback only. OnGetTile could replace OnDrawTile and exists for simplicity - you don't have to paint tile image every time, the map will do it internally. It could also be assigned together with OnDrawTile which will only be called if OnGetTile doesn't return a result.

+
+ + +
Public property OnDrawTile: TOnDrawTile read FOnDrawTile write FOnDrawTile;

-Callback is called when map tile must be drawn

+Callback to draw an image of a single tile having number (TileHorzNum;TileVertNum) at point TopLeft on canvas Canvas. Must set Handled to True, otherwise default actions will be done.
Called when map tile must be drawn. OnDrawTile could replace OnGetTile but provides more flexibility - handler fully controls painting which allows adding watermarks, layers and so on. It could also be assigned together with OnGetTile and will only be called if OnGetTile doesn't return a result. + +

If Handled is not set to True, default drawing is called for the tile.

@@ -526,7 +617,7 @@

Properties

-Callback is called when map tile with loading state must be drawn

+Callback to draw a loading state of a single tile having number (TileHorzNum;TileVertNum) at point TopLeft on canvas Canvas. Must set Handled to True, otherwise default actions will be done. Called when map tile with loading state must be drawn OnDrawTileLoading is called only for empty tiles allowing a user to draw his own label

@@ -536,7 +627,7 @@

Properties

-Callback is called when zoom level is changed

+Called when zoom level is changed

@@ -546,7 +637,7 @@

Properties

-Callback is called when mapmark must be drawn

+Callback to custom draw a mapmark. It is called before default drawing. If Handled is not set to True, default drawing will be done. User could draw a mapmark fully or just change some props and let default drawing do its job

@@ -556,7 +647,7 @@

Properties

-Callback is called when selection with mouse was made

+Called when selection with mouse was made


Generated by PasDoc 0.15.0. diff --git a/docs/docs/OSM.MapControl.html b/docs/docs/OSM.MapControl.html index 202b53a..34aed63 100644 --- a/docs/docs/OSM.MapControl.html +++ b/docs/docs/OSM.MapControl.html @@ -104,34 +104,31 @@
See also
TMapMouseMode = (...);
TOnDrawTile = procedure (Sender: TMapControl; TileHorzNum, TileVertNum: Cardinal; const TopLeft: TPoint; Canvas: TCanvas; var Handled: Boolean) of object;TOnGetTile = function (Sender: TMapControl; TileHorzNum, TileVertNum: Cardinal): TBitmap of object;
TOnDrawMapMark = procedure (Sender: TMapControl; Canvas: TCanvas; const Point: TPoint; MapMark: TMapMark; var Handled: Boolean) of object;TOnDrawTile = procedure (Sender: TMapControl; TileHorzNum, TileVertNum: Cardinal; const TopLeft: TPoint; Canvas: TCanvas; var Handled: Boolean) of object;
TOnDrawMapMark = procedure (Sender: TMapControl; Canvas: TCanvas; const Point: TPoint; MapMark: TMapMark; var Handled: Boolean) of object;
TOnSelectionBox = procedure (Sender: TMapControl; const GeoRect: TGeoRect) of object;

Constants

- - - - - - - + - + - + - +
CacheImageDefTilesH = 8;
CacheImageDefTilesV = 8;
CacheImageDefWidth = CacheImageDefTilesH*TILE_IMAGE_WIDTH;DefaultCacheImageTilesHorz = 8;
CacheImageDefHeight = CacheImageDefTilesV*TILE_IMAGE_HEIGHT;DefaultCacheImageTilesVert = 8;
CacheMarginSize = 2;DefaultCacheMarginSize = 2;
LabelMargin = 2;DefaultLabelMargin = 2;
DefaultMapMarkGlyphStyle: TMapMarkGlyphStyle = ( @@ -321,84 +318,73 @@
Values
- +
TOnDrawTile = procedure (Sender: TMapControl; TileHorzNum, TileVertNum: Cardinal; const TopLeft: TPoint; Canvas: TCanvas; var Handled: Boolean) of object;TOnGetTile = function (Sender: TMapControl; TileHorzNum, TileVertNum: Cardinal): TBitmap of object;

-Callback to draw an image of a single tile having number (TileHorzNum;TileVertNum) at point TopLeft on canvas Canvas. Callback must set Handled to True, otherwise default actions will be done. This type is common for both TMapControl.OnDrawTile and TMapControl.OnDrawTileLoading callbacks. - -

Note for TMapControl.OnDrawTile:
If Handled is not set to True, TMapControl.DrawTileLoading method is called for this tile. Usually you have to assign this callback only. - -

Note for TMapControl.OnDrawTileLoading:
The handler is called only for empty tiles allowing a user to draw his own label

+Callback to get an image of a single tile having number (TileHorzNum;TileVertNum). Must return bitmap of a tile or Nil if it's not available at the moment

- +
TOnDrawMapMark = procedure (Sender: TMapControl; Canvas: TCanvas; const Point: TPoint; MapMark: TMapMark; var Handled: Boolean) of object;TOnDrawTile = procedure (Sender: TMapControl; TileHorzNum, TileVertNum: Cardinal; const TopLeft: TPoint; Canvas: TCanvas; var Handled: Boolean) of object;

-Callback to custom draw a mapmark. It is called before default drawing. If Handled is not set to True, default drawing will be done. User could draw a mapmark fully or just change some props and let default drawing do its job

+Callback to draw an image of a single tile having number (TileHorzNum;TileVertNum) at point TopLeft on canvas Canvas. Must set Handled to True, otherwise default actions will be done. This type is common for both TMapControl.OnDrawTile and TMapControl.OnDrawTileLoading callbacks.

- +
TOnSelectionBox = procedure (Sender: TMapControl; const GeoRect: TGeoRect) of object;TOnDrawMapMark = procedure (Sender: TMapControl; Canvas: TCanvas; const Point: TPoint; MapMark: TMapMark; var Handled: Boolean) of object;

-Callback to react on selection by mouse

+Callback to custom draw a mapmark. It is called before default drawing. If Handled is not set to True, default drawing will be done.

-

Constants

- +
CacheImageDefTilesH = 8;TOnSelectionBox = procedure (Sender: TMapControl; const GeoRect: TGeoRect) of object;

-Default W and H of cache image in number of tiles. Memory occupation of an image: (4 bytes per pixel) * TilesH * TilesV * (65536 pixels in single tile)
For value 8 it counts 16.7 Mb

+Callback to react on selection by mouse

+

Constants

- - - -
CacheImageDefTilesV = 8;
- - - +
CacheImageDefWidth = CacheImageDefTilesH*TILE_IMAGE_WIDTH;DefaultCacheImageTilesHorz = 8;

-Default W and H of cache image in pixels

+Default Width (Horizontal dimension) and Height (Vertical dimension) of cache image in number of tiles. Cache is init-ed with these values but could be changed later.
Memory occupation of an image: (4 bytes per pixel) * TilesH * TilesV * (65536 pixels in single tile)
For value 8 it counts 16.7 Mb

- +
CacheImageDefHeight = CacheImageDefTilesV*TILE_IMAGE_HEIGHT;DefaultCacheImageTilesVert = 8;
 
- +
CacheMarginSize = 2;DefaultCacheMarginSize = 2;

-Margin that is added to cache image to hold view area, in number of tiles

+Default margin that is added to cache image to hold view area, in number of tiles

- +
LabelMargin = 2;DefaultLabelMargin = 2;

-Size of margin for labels on map, in pixels

+Default size of margin for labels on map, in pixels

diff --git a/docs/docs/index.html b/docs/docs/index.html index f9b43d9..1692f0b 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -25,24 +25,24 @@

All Units

- - + + - - + + - - + + - - + + - - + +

Generic (no real network implementation) classes and declarations for requesting OSM tile images from network.

OSM.SlippyMapUtils

OSM map types & functions.

OSM.NetworkRequest.RTL

Implements blocking HTTP request with HTTP class from RTL.

OSM.TileStorage

OSM tile images cache.

OSM.NetworkRequest.Synapse

Implements blocking HTTP request with Synapse framework.

RTLInetRequest

Implements blocking HTTP request with HTTP class from RTL.

OSM.NetworkRequest.WinInet

Implements blocking HTTP request with WinInet.

SynapseRequest

Implements blocking HTTP request with Synapse framework.

OSM.SlippyMapUtils

OSM map types & functions.

WinInetRequest

Implements blocking HTTP request with WinInet.

OSM.TileStorage

OSM tile images cache.


Generated by PasDoc 0.15.0.