# Registering MapWinGis.ocx

**URL:** <https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269>\
**Category:** MapWinGIS\
**Created:** [September 29, 2019, 9:58am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269 "2019-09-29T09:58:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [September 29, 2019, 9:58am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/1 "2019-09-29T09:58:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [September 29, 2019, 9:03pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/2 "2019-09-29T21:03:12Z")

</div>

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](https://docs.microsoft.com/en-us/previous-versions/dotnet/articles/ms973913(v=msdn.10)?redirectedfrom=MSDN) 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.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [September 29, 2019, 11:29pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/3 "2019-09-29T23:29:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [September 30, 2019, 12:09am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/4 "2019-09-30T00:09:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [October 4, 2019, 9:12pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/5 "2019-10-04T21:12:28Z")

</div>

Hello Jerry

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

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [October 10, 2019, 5:02pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/6 "2019-10-10T17:02:01Z")

</div>

Hello again.

Have a look at [this issue](https://mapwindow.discourse.group/t/mapwingis-vb-net-without-install/282) for instructions on how to distribute the OCX without registration.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [October 10, 2019, 6:16pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/7 "2019-10-10T18:16:32Z")

</div>

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](http://tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png)”, tkTileProjection.SphericalMercator, 1, 18);

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [October 10, 2019, 11:59pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/8 "2019-10-10T23:59:04Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [October 11, 2019, 6:38am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/9 "2019-10-11T06:38:43Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [October 11, 2019, 6:53am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/10 "2019-10-11T06:53:08Z")

</div>

_I meant a correction in order_ AxMap1.TileProvider = tkTileProvider.OpenStreetMap will work

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [October 11, 2019, 5:21pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/11 "2019-10-11T17:21:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [October 13, 2019, 6:54pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/12 "2019-10-13T18:54:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [October 14, 2019, 1:03am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/13 "2019-10-14T01:03:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [October 14, 2019, 6:50am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/14 "2019-10-14T06:50:09Z")

</div>

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](https://www.mapwindow.org/documentation/mapwingis4.9/getting_started.html) you can see some more examples and screenshots.

---

<div class="post-metadata">

**Author:** ![Vadym](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Vadym](https://mapwindow.discourse.group/u/Vadym)\
**Post date:** [October 14, 2019, 8:12am UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/15 "2019-10-14T08:12:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [October 21, 2019, 4:00pm UTC](https://mapwindow.discourse.group/t/registering-mapwingis-ocx/269/16 "2019-10-21T16:00:01Z")

</div>

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