LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom Maps

Allen,

 

I think that could work with a LV Picture Control.  I've found some forum posts with examples that might be useful.  Using an LV Picture Control will solve the issue of porting to Red Hat too.

 

'Ed Dickins' has an example in this thread of how to move JPGs around.

TST has an example of dragging a picture here.

Post #11 here has an example of rotating picture.

Here is a post on how to transition between images - useful for zooming in you application.

 

I hope that helps.  Let me know how you get on and what other functions you'll need to implement.

 

Regards,

Oli
LabVIEW Student Ambassador
National Instruments UK
0 Kudos
Message 21 of 30
(1,544 Views)

Hi Oli,

 

Thanks for those pointers to applications - I'll have a look at them and hopefully, there will be a good solution!

I really appreciate you help,

 

Best wishes,

 

Allen

0 Kudos
Message 22 of 30
(1,541 Views)

Hi Oli,

 

I've just noticed that all those applications relate to LabView .....

 

We're only using CVI!!!

 

Any similar samples in CVI?

 

Thanks,

 

Allen

0 Kudos
Message 23 of 30
(1,537 Views)

Hi,

 

Sorry about that.  I'd forgotten.

 

CVI complicates things.  I'll have a look to see what I can find.

 

Regards,

Oli
LabVIEW Student Ambassador
National Instruments UK
0 Kudos
Message 24 of 30
(1,533 Views)

Hi Allen,

 

It looks like the best thing to use to implement this in CVI is a 'Canvas Control'.  I've found a few links that might be useful.  I've never used a canvas control before, so I can't suggest anything specific to try.

 

Creating a map and compass

How to program a two layers picture?

Looking for a picture control for CVI that is zoomable

How to control image file (jpg, bmp)

GPS maps or Google earth

 

I also did a search for 'Canvas Control' in the CVI forums, which had a lot of results.  Rather than post them here, perhaps you could take a look?

 

Hope that's of some use

 

Regards,

Oli
LabVIEW Student Ambassador
National Instruments UK
0 Kudos
Message 25 of 30
(1,517 Views)

Good morning Oli,

 

Many thanks - and yes, I have been looking at using the canvas control, it certainly appears to have all the facilities that are required.

It will be a weekend of coding - and I'll let you know how we get on.

 

Many thanks for your help,

 

Allen

0 Kudos
Message 26 of 30
(1,513 Views)

Hi,

 

I tried the canvas control, but am having more success with using a graph as the basis for the map.

However, there are two aspects with which I would appreciate some guidance:

 

1)  The graph control in the UIR allows for various types of 'Zoom' - zoom around a point, zoom to a rectangle, zoom on x-axis or zoom on y-axis.   The attribute to disable the zoom functionality states 'Zooming/Panning  Disabled', and the 'SetCtrlAttribute' control also states 'ATTR_ENABLE_ZOOM_AND_PAN'

 

I can make the map 'Zoom', but where and how is the 'PAN' aspect implemented?

 

2)  When using the 'Zoom around a point' aspect, the 'CTRL' key has to be held down whilst left-clicking the mouse.

How can I 'catch' this event?  Using the standard EVENT_LEFT_CLICK responds to the first left-click of the mouse with the CTRL key held down, but the event does not respond to subsequent 'clicks', unless the 'CTRL' key is released and re-pressed for the next left-click.

 

Many thanks for any advice,

 

Allen

 

0 Kudos
Message 27 of 30
(1,476 Views)

Hi,

 

concerning the second aspect, you could consider GetGlobalMouseState (NULL,NULL,NULL,NULL,NULL,&key_modifiers);

 

With respect to your first question of panning, press <Ctrl-Shift> and click and hold the left mouse button.

 

Wolfgang

0 Kudos
Message 28 of 30
(1,473 Views)

Hi Wolfgang,

 

Many thanks - you have answered both of my questions!

 

Bset wishes,

 

Allen

0 Kudos
Message 29 of 30
(1,471 Views)

pleased to hear - my pleasure!

0 Kudos
Message 30 of 30
(1,468 Views)