Tile Providers don´t show content in map control Access Form

Hello everyone:

Years ago, I have been using the MapwinGIS ocx component, in MSAccess forms, with VBA code.
I have been able to load layers, and show them on a provider (OpenStreetMap, GoogleMaps, Googlertain, etc)

For some time, when assigning to my map object the usual code, the content in the viewer is not shown, under the loaded shape.

Map0.TileProvider = tkTileProvider.OpenStreetMap

I can no longer freely load these providers?

Thank you

Hello @amarichal.

  1. Have you updated to a recent version of MapWinGIS?
  2. Are you getting an error message or any indication why it cannot be loaded?

Thank you.
Jerry.

Thanks, Jerry.

  1. Yes, I updated to a recents versions of MapWinGIS, 5.0 and 5.1

  2. I haven’t received any messages during execution

I thought I could use tile providers in the new versions.

Thanks again
amarichal

The OSM tiles are still freely available.
You need at least these lines to get the tiles:

AxMap.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR;
AxMap.TileProvider = tkTileProvider.OpenStreetMap;
AxMap.KnownExtents = tkKnownExtents.keUSA;

Of course KnownExtents can be changed to your needs.
You can also set Tiles.LogFilename and see if you have any traffic or errors.

Here are some more explanations: Tiles class reference

Thanks again.

Sorry Paul, I can’t visualize with the lines of code provided OSM tiles, the map control appears empty.

Only OSM tiles are still freely available, none from Google ?

Won’t other tile providers work in previous versions of MapWinGIS activex?

Bing is also available, but you need an API key.
Google doesn’t allow access anymore for years now. You could of course create a custom provider and add the urls of Google to see if they still work.

And can you post parts of the tiles logging file?

I’ve recently had to update, and I seemed to detect a similar problem.
similar thread: Tile Server for open street map - #3 by pmeems

using the standard code

AxMap.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR;
AxMap.TileProvider = tkTileProvider.OpenStreetMap;
AxMap.KnownExtents = tkKnownExtents.keUSA;

Seems to work, if not VERY slowly. I did have some problems when I’m changing the projection.