This project is read-only.

online base maps (like OSM)

Mar 28, 2011 at 4:42 PM


I'm using MapWinGIS.ocx in a VB.NET project  I've got several problems showing different TIF/TFW files in the application.

As a solution I thought about online base maps and was looking for it in this forum. In another post ( Sergej wrote: "We have mwTiles plug-in for MW4 which can download images from the OpenStreetMap." That sound very interesting for me, but I couldn't find anything where to find it or how to use it!! So if anybody knows, please help me.

Many thanks!

Mar 28, 2011 at 4:58 PM
Edited Mar 28, 2011 at 4:58 PM

mwTiles is a plug-in for MapWindow 4 application.  So it can't be used from the VB.NET stand-alone project.

You can download MapWindow 4 to see how the plug-in is working:

The source code for plug-in is here:

Mar 29, 2011 at 10:31 PM

Ok, thanks for your reply.

I tried to run the mwTiles-Plugin in Mapwindow (and even tried to understand the source-Project) but i didn't succeed:-( After click on the Menuitem e.g. Tiles -> OpenStreetMap there is the "Tiles"-Item in the Legend but nothing more happens...

But that's not my main problem. I use the MapWinGIS.ocx in my application and I like to implement online-base-maps, because several users have problems with converting images in the correct format and/or georeferencing them.

So it would be great, if there is a (simple) possibility to show online ressources like Google Maps, OpenStreetMap or other WMS- or WFS-services as a basemap in MapWinGIS.

I also found the OnlineDatPlugin. But I think it is the same problem: it only works as a plugin in MapWindow and not with the ActiveX-version?!  Or has anyone an idea (VB.NET codesnippets) how to use the OnlineDataPlugin.dll?

Thanks again for your help!

Mar 31, 2011 at 9:24 AM

We have a sample project that will open The Netherlands in the correct projection.
mwTiles will be triggered and the tiles will be downloaded. Try downloading this project from (get all the files).

We have some ideas about implementing tiles, wfs and wms services directly in the ocx, but we need time and funding.
Because of the time this implementation will not be for v4.8 which will be released in June 2011 but for v4.9.

If you can get some funding we might be able to implement it this summer.



Sep 13, 2011 at 10:34 PM

What's the latest status on this? Does dotSpatial support WMS layers? I really want to be able to display freely available tiles for base maps under imported shapefiles.. hoping this capability already exists.

Sep 14, 2011 at 1:44 PM

This forum is about MapWinGIS, the C++ ActiveX mapping control.
DotSpatial is a different project, although somewhat related.

MapWindow can use tiles from OpenStreetMap, Yahoo maps, ArcGIS Online, etc. using the mwTiles plug-in.

WMS/WFS support is not yet implemented and will not be implemented in v4.8.
For v4.9 we will try to implement it. And we're still looking for funding.


Nov 20, 2012 at 12:53 PM

 Hello everybody,

as I need to implement WMS-support with my GIS-Application (currently MapWinGis.ocx 4.8 in Access vba) I wonder what the current state of affairs is.

regards Helmut

Nov 21, 2012 at 12:52 PM

Hi Helmut,

The status about the tiles is that it is implemented in v4.9 of MapWinGIS. It is not yet possible to also read WMS/WFS services.
We now don't only need funding for this but also someone who can implement it. But funding is the most important part of course ;)


Dec 7, 2012 at 3:17 AM
Edited Dec 7, 2012 at 3:20 AM

I also have a need to use tiles which are .TIFF files with corresponding .TFW files... is there any way to load these into MapWinGIS at present?  Paul, from your note about 4.9 it sounds like maybe it is available in non-released form... is it possible to get a copy if that is the case?  If I can't get tiles working am I basically looking at loading a single large stiched together TIFF?

Dec 7, 2012 at 4:03 AM

MapWinGIS has supported GeoTiff with TFW files for some time now.  - Dan

Dec 7, 2012 at 5:11 AM
Edited Dec 7, 2012 at 5:13 AM

Thanks Dan, how would I go about loading them into a map layer?  It looks like a layer only supports a single image... would I load each tile into a separate layer and allow the trw file definitions to position the tiles appropriately?  What I'd like to do is to load all te TIFFs into a single base map layer if possible... and ideally maybe the layer would do some intelligent loading based on the map's current extents?

My current project has a single multi GB TIFF file (with supporting index files of some kind) and MapWinGIS is loading it like a champ and never seems to have a memory footprint beyond about 120 Meg... very cool.  Now I am being handed a set of TIFF and TRW files right before we go to final release testing... :-)

Anyway, any ideas are hugely appreciated

Dec 7, 2012 at 1:21 PM

Do you mean you have a folder with a lot of tiff files with accompanying tfw files?
If so you can add a vrt file. This is a xml file made with gdalbuildvrt.exe ( You can load this vrt file in MapWindow/MapWinGIS.

At this point you cannot create this vrt file using MapWindow, you need gdalbuildvrt.exe. You can get it at here: Copy the exe in the same folder as MapWindow.exe and you should have all the correct files.

In the near future we hope to have implemented building vrt files in MapWinGIS.


Dec 7, 2012 at 1:31 PM

Thanks Paul, that sounds like exactly what I need!  Do I add the vrt file to a layer in the same way I would add the image?

Dec 11, 2012 at 10:57 AM

Yes you would.

A vrt-file is handled as a 'normal' image file.

Jan 29, 2013 at 2:49 PM


does this work for the OCX version?



Jan 29, 2013 at 3:08 PM

Yes. it does.  Generating the files properly seems to be a bit of a trick... when I tried it, the file I created looked and performed terribly.  A collegue went off and used some ESRI product to generate the files with proper pyramiding and indexing and now our 4GB TIFF works like a champ with really good performance.  I assume the GDAL stuff could have done the same if I had known what I was doing. but I'm pretty much a GIS newbie.

Feb 4, 2013 at 2:46 PM
In the Utils class of the ocx we have implemented several GDAL methods. AddOverviews() is for creating pyramids and VrtBuilder is for creating the VRT file.
Tools doing the same will be added to the toolbox of MapWindow (desktop version).

ArcMap is also using GDAL for their raster handling, so it is save to say that what your colleague did in ArcMap can also be done in GDAL and thus in MapWindow ;)

Jun 4, 2013 at 12:58 PM
Hello again,

as I understood, mapWindow.ocx 4.9 will be released soon. Therefore I wonder if it will include the possibility to display WMS-Data, as proposed earlier.

If not I would be interested in seeing some code or a description of how to display WMS-data so I could maybe embark on writing a Library to do so.

Any tips are welcome.

Thanks and regards

Jun 6, 2013 at 7:47 AM

v4.9 will be able to load some wms data using the tiles methods.
I'm not sure if it can load all wms data.
Here's is some sample code about WMS:
I've used it before to create a WMS plug-in for a specific task.
Aug 10, 2013 at 3:03 PM
Edited Aug 10, 2013 at 3:03 PM

I would like to use MapWinGIS control in my VB application to plot sampling points on a map. I was trying to add tiles from online map providers using this code


and cannot find documentation how to specify correctly all required arguments.

Any help pointing how to add tiles from online sources is appreciated.

Thank you
Aug 23, 2013 at 6:29 PM
Edited Aug 23, 2013 at 6:36 PM
Example code of how to use e.g. the openstreetmap or google tiles provider would be very appreciated. Can't find any example of how to use it. thx in advance
Aug 26, 2013 at 10:19 AM
Edited Aug 26, 2013 at 10:19 AM

for those looking for a solution: it is necessary to set a projection for tiles to work:
  myGeoProjection := CoGeoProjection.Create;
  myGeoProjection.ImportFromEPSG(4326) <> TRUE then;
  MapWinGIS1.GeoProjection := myGeoProjection;

  myTiles := coTiles.Create;
  myTiles.Key := '...................................';
  myTiles.Provider := GoogleMaps;
  MapWinGIS1.Tiles := myTiles;
the current version (4.9 beta) has a bug that doesn't set the right tiles provider. OpenStreetMaps is always used, even though google or bing maps is set in code.
Nov 30, 2013 at 6:01 PM

I develop a geographic application which is offline.
I am very interesting by 4.9.1 version of ocx found in source code; it would be a good solution to combine a fixed geopgrahic tile map (generated by mapnik for example) and specific data in shapefiles.
Does anyone have a sample code in any language, a brief documentation, or just a pseudo code, to try these functions with a custom tile provider or precalculated local files?

For information, I develop this application with Delphi XE2.

Thank you in advance