Registering MapWinGis.ocx

Dear developers of MapWinGis
Very pleased with your component MapWinGis.ocx. It is very helpful for developing decision support applications for forest fires extinguishing. Thank you very much for such a helpful tool.
My application uses MapWinGis.ocx. But deploying it I have to make users install MapWinGis.
Is there a way to bypass this step. For example, registering this .ocx without having to install MapWinGis?

Hello @Vadym, and Welcome.

There are basically 3 things that happen during installation.

  1. Distribution of all the necessary files
  2. Installation of the Visual C Runtime (v141), and
  3. Registration of the OCX

Step 1 is always necessary, but easy enough to do.
Step 2 may not be necessary depending upon which version of Windows you are using; in other words, it may be that the c runtime is already shipped with some versions of Windows 10 (I don’t know for sure).
Step 2 is optional IF you create a manifest file for the OCX, which is generally not difficult, at least if you’re developing in Visual Studio.

Are you building the OCX yourself? or just using the distribution?

Regards,
Jerry.

Hello Jerry

Thank you for your quick response.

Following the instructions of your forum I managed to compile source of the of MapWinGis.ocx from GIT. You suppose that that will make things easier for me in some way?

Of course I will learn what you advised me as to registering com objects. That is my fault. I have not dealt with such an issue earlier.

Best regards

Vadym

Hello again.

So if you’re building the OCX yourself, then you know that everything that has to be distributed is in the ‘bin\win32’ directory (likely C:\dev\MapWinGIS\src\bin\Win32).

Regarding the application you are distributing, what is the development tool you are using? And do you know if it is set up to build a manifest file for you?

Hello Jerry

I’m using Visual Studio 2017 and my application is supposed to be installed on Windows 10.

Hello again.

Have a look at this issue for instructions on how to distribute the OCX without registration.

Hello Jerry
Thank you very much. It worked without any problem. But I noticed a strange effect.

With MapWinGis preinstalled OSM background is drawn and is not drawn when I include all the needed components into the installation set.

For OSM I use reference below

providers.Add(providerId, “MyProvider”, “https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png”, tkTileProjection.SphericalMercator, 1, 18);

Are you saying that you cannot get the OSM tiles to show at all? I’ll have to think about that…

Out of curiosity, is there are a reason you are defining OSM as a custom tile provider, rather than

AxMap1.TileProvider = tkTileProvider.OpenStreetMap

Hello Jerry

There was an issue about the problem with rendering OSM discussed on your blog

https://mapwindow.discourse.group/t/openstreetmap-tiles-and-5-0-1-1/180

Maybe you will give me a clue where I should put a correction in some source C++ file of MapWinGis.ocx project. Then I can recompile the project and have a corrected ocx.

I meant a correction in order AxMap1.TileProvider = tkTileProvider.OpenStreetMap will work

Ok, I see. I recall now that Paul addressed the issue in the link you sent.

If you go to the bottom of that link, Paul added a link to his Google drive (it’s also at the top of this page), where he has put an updated installer (v5.0.2.0) that has the fix you’re looking for. This way you don’t have to incorporate the changes yourself.

If you want all of the latest changes to do your own build, then of course you can just get the latest ‘develop’ branch from GitHub.

Regards,
Jerry.

Thank you very much. I’ve downloaded MapWinGIS-only-v5.0.2.3-Win32.exe. Of course, I’d rather have your build.

Unfortunately, the problem with OSM still remains the same with isolated variant MapWinGis.ocx

Hello @Vadym

  1. When you refer to ‘my build’, you should know that my build is just the latest ‘develop’ build from GitHub.
  2. I’m not sure what’s going on with OSM in the isolated OCX. In theory, assuming the OCX and all of the support files are identical (between the registered and the isolated versions), there should be no difference in behavior. I’ll see if I can set up a test to recreate this. @pmeems, do you have any thoughts on this?

Regards,
Jerry.

Two days ago I’ve setup a fresh Win10 VirtualBox with just VS2019. I downloaded the latest installer from my Google Drive and installed it.
Next I could create a new WinForms application and drop the map component on my form and run it with the default OSM tiles in place.
So I’m not sure why it is not working on your end.

Did you uninstall all previous versions of MapWinGIS? The installer should do so, but it doesn’t hurt to check.

When you go to your forms designer and select the map control, you can change some properties.
First you start with the projection. Set it to Google-Mercator. Next set the known extents and the TilesProvider and even in the designer the tiles should show up.

At Getting started you can see some more examples and screenshots.

Hello Paul
I’ve finally managed to install my application that includes your MapWinGis.ocx without registration with OSM rendering.

I’m sorry for disturbing you. It was my fault. Somehow in the distributable package appeared
MapWinGis.ocx of version 5.0.1.0

Now I’ve made an installation that includes your latest release 5.0.2.3.

Thank you very much for your efforts.

This topic was automatically closed after 5 days. New replies are no longer allowed.