LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mapwingis

Hello
I would like to ask if anyone uses Mapwingis Labview - I am trying to create a software that displays maps from offline files *. shp. I have yet only major problem - although it seems that the class of MapWinGis working properly (for example, flag to open shapefile is TRUE), does not show me anything in the ActiveX container element Map (Mapwingis Control 8.6). I do not know if I have detected, Labview, or classes MapwinGis.

I use LV2011, OSWin7.
You tell me anyone know how to view the map?
Thanks, Roman

0 Kudos
Message 1 of 19
(9,721 Views)

Hi Roman!

 

What you need to do is Add a Layer to your MapWinGIS ActiveX control. The Add Layer fuction acceps an object (which is  going to be the map file you've opened) and a Visible boolean (which you have to set to true) as an input. Once you have your layers set up they should be visible.

 

Kind regards:

 

Andras Valko

NI Hungary

Andrew Valko
National Instruments Hungary
0 Kudos
Message 2 of 19
(9,674 Views)

Hello, Mr. Valko,
thanks for the reply - I thought that no one writes. 🙂
The problem: I went through the source code for the classes and functions of MapWinGis, but according to one of my colleagues is a problem with the input parameter to the function AddLayer -> Object shapefile. This input parameter is data type LPDISPATCH - the general data type.
I created the program as follows - viz. LV image with part code, where I perform readout *. shp file and want to add it to the layer for display. I did it just as you described - to function AddLayer Writing Automation Refnum - the instance of the class, not an instance of an object - shape maps. I do not know whether this is good - I took it from the example of the C language, which is available on the Web mapwindow. This example works on my PC without any problems.
It is possible that the operation affects ActiveX Labview forum containers? Where else could be the problem?

thanks for the reply.

Roman

0 Kudos
Message 3 of 19
(9,665 Views)

Dear Roman!

 

The reason why the Object input is general is because it accepts Shapefiles, Images and even Callbacks, I believe. 

 

The architecture you created looks good to me. How do you create the shapefile reference? What is the Layer handle Number created? If you check the NumofLayers property, does it return 1 or 0?

 

Since MapWinGIS is predominantly written for languages like C#, we might need to employ some additional tricks to make things work, not just translate the code to LabVIEW. I'll try to create some example code for that purpose.

 

Kind regards:

 

Andrew Valko

NI Hungary

 

Andrew Valko
National Instruments Hungary
0 Kudos
Message 4 of 19
(9,651 Views)

Hello, Mr.Valko,

 

You have truth, that the object input is general for various datatype - shapefiles, images, even Callback. That information is true. It is possible, that program function is correct, but the class from MapWinGis is not supported in Labview, and exchange between programer language is bad. I tried to write by sw company MapWinGis - in the support, but nobydy answered me. 

I want consult another problem.

When it is my program for load Maps at runtime, it sometimes occurs that the application is completed - runtime crash - it generates code for sending to NI and solve the problem. (see printscreen with popup window). You might decode this message?
thanks for the report. 

 

Roman

0 Kudos
Message 5 of 19
(9,634 Views)

Dear Roman!

 

Sorry for the late reply, I was on vacation for the last few days. The crash screen that you submitted tells me no additional information, since all it has is a memory address where the access violation has occured, and nothing else. If you view the report we might be able to tell more. Is the crash generated when the application closes? Is there no error aside? (I mean it works as expected, closes as expected, then this window pops up, correct?) Please also make sure that you send the crash report to NI. Smiley Happy 

 

You are indeed correct in that MapwinGIS is unsupported in LabVIEW; however, that is no reason why it could not work at all. I'll try and see whether I can fix up something. Please get back to me if you have other questions or any progress. Thank you!

 

Best regards:

 

Andrew Valko

NI Hungary

Andrew Valko
National Instruments Hungary
0 Kudos
Message 6 of 19
(9,587 Views)

Hello, Mr. Valko, 🙂

 

Rested you during the holidays? 🙂 Usualy I hasen't rest during holidays, in work it is better. 🙂

 

On beginning - MapWinGis function correct in Labview order in version 4.7. Version 4.8 is only beta revision, and is not full supported for Win7 and LV (for this time). 

When i installed MapWinGis 4.7 (instal only mapwingis.ocx), all problems ended. In this time i'm programing Map aplication and the only problem it is, that version 4.7 doesn't contain all classes and methods. For basic aplication it is enough. I believe that time will mapwingis 4.8 tuned for use in LV. 

 

Thangs for help. 

 

Best regards

R. Žárský

0 Kudos
Message 7 of 19
(9,565 Views)

Hello Roman,
I want make a Maps viewer offline in Labview 2009. I'm trying to use MapWinGIS ActiveX. I still haven't got your problem.
I don't know create a instance of class Shapefile or shape.

Can you help me?, please.

 

Regards,

 

Emilio

Download All
0 Kudos
Message 8 of 19
(9,413 Views)

Hello everybody

 

Have the same need of using maps in LV, and MapWinGIS looks like a good option on paper. I install activeX component and load it into a activeX container in LV, and created the VIs shown in this thread, but either the  *.shp file doesn't load or I get Error 97 like Emilio. Since this thread is pretty much the only useful info about this issue on the internet, it would be very nice if some of you could comment if anybody is using MWG in Labview successfully. If so I am very interested knowing which versions of Windows/LV/MWG is working. Even more so if somebody could provide a small VI that works in regard to get a map loaded, I can do a quick test with.

 

If not, what other options are there regarding MAP APIs in Labview?

 

Regards

Bård

0 Kudos
Message 9 of 19
(9,261 Views)

Hello, everybody,

 

I use Mapwingis in labview 2011. MWG is in version 4,7, all newer version isn´t running in Labview. 
The problem starts loading shp files - LV can not create instance of the class, the same in C#, or other. Interface functions is different in MWG 4.7 and 4.8. You can search in mapwingis phorum. Programer can use with version 4.8 the polymorhpismus functions, and interface are prepare for this method. It isn´t work in Labview .Why? I don´t know.. 

 

Have a nice day.

Roman

Message 10 of 19
(8,952 Views)