Click here to Skip to main content
15,891,976 members
Articles / Programming Languages / Visual Basic

Georeferencing Open Street Map Tiles to Use with MapWinGIS

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
19 Sep 2012CPOL3 min read 56K   3.5K   15  
How to add an Open Street Map overlay to a Map using MapWinGIS.
<?xml version="1.0"?>
<doc>
<assembly>
<name>
OSMTilesforMapWinGIS
</name>
</assembly>
<members>
<member name="M:OSMTiles.mOpenStreetMapLayer.UpdateMapImage(System.Object@)">
	<summary>
 This function loads a set of Open Street Map Slippy Map Tiles, as geo-referenced images, to the Map Window.
 Enough images are used to cover the entire area displayed.  
 </summary>
	<param name="MapMain">Pointer to the AxMapWinGIS Map object.</param>
	<remarks></remarks>
</member><member name="M:OSMTiles.mOpenStreetMapLayer.LoadOSMTile(System.Object@,System.Drawing.Point,System.Int32)">
	<summary>
 This function sources the appropriate map tile, either from the local file cache, or from an OSM Tile server. 
 The tile is geo-referenced and then added to the AxMapWinGIS Map.
 </summary>
	<param name="MapMain">Pointer to the AxMapWinGIS Map object.</param>
	<param name="TileRef">The Open Street Map Slippy Tile Coordinates in X and Y. X and Y are both 0 to 2^ZoomLevel-1 </param>
	<param name="ZoomLevel">The Zoom Level required. 0-18</param>
	<remarks></remarks>
</member><member name="M:OSMTiles.mOpenStreetMapLayer.CalcTileXY(System.Single,System.Single,System.Int64)">
	<summary>
 Convert a Latitude, Longitude and Zoom level into an Open Street Map Slippy Tile reference.
 </summary>
	<param name="LatDeg">Latitude in degrees for a point inside the tile (-85 to +85)</param>
	<param name="LonDeg">Longitude in degrees for a point inside the tile (-180 to + 180)</param>
	<param name="ZoomLevel">Zoom level (0-18)</param>
	<returns>A Point Variable with the Slippy Map Tile X and Y as parameters</returns>
	<remarks>Algroithm is from http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Derivation_of_tile_names </remarks>
</member><member name="M:OSMTiles.mOpenStreetMapLayer.CalcTileTLCoord(System.Drawing.PointF,System.Int64)">
	<summary>
 Calcualte the Georeference for the Top Left Hand corner of the Open Street Map Slippy Tile
 </summary>
	<param name="TileCoord">Open Street Map Slippy Tile reference</param>
	<param name="ZoomLevel">Zoom level used (0-18)</param>
	<returns>A Point Variable with the Slippy Map Tile Top Left Corner Longitude and Latitude as X and Y parameters</returns>
	<remarks>Maths comes from: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Derivation_of_tile_names </remarks>
</member><member name="P:OSMTiles.My.Resources.Resources.ResourceManager">
	<summary>
  Returns the cached ResourceManager instance used by this class.
</summary>
</member><member name="P:OSMTiles.My.Resources.Resources.Culture">
	<summary>
  Overrides the current thread's CurrentUICulture property for all
  resource lookups using this strongly typed resource class.
</summary>
</member><member name="T:OSMTiles.My.Resources.Resources">
	<summary>
  A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
</members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect CBNL
United Kingdom United Kingdom
I dabble in a bit of programming as part of my job.

Comments and Discussions