Lord Arokh


Hi Everybody,

I've project, that I have to use a custom worldmap and show some other drawing according their coordinates.Now I managed to draw the worldmap with FORM.LINE method.

To zoom in/out I have to scale the worldmap. When I scaled 10x or much more times I can see the part that is on the form. And the other parts of the worldmap which is extended out of the form is lost. Because the LINEs that are created with LINE method aren't objects, form doesn't show any scroll bars to scroll left/right/up/down.

So I need some thing like a canvas so that I can draw anything on it. And even it is off view I can managed to scroll to the extended drawing parts.

Any ideas

KAYA,Tolga





Re: Expecting Advise on A Graphics Problem

CetinBasoz


Tolga,

You can provide a canvas by placing slider controls.

However using a map activex like mapObjects, mapPoint etc would be much easier (search for GIS,activex keywords, you have a chance to find a free one). Lines are problematic to manage for map drawings yourself (it works, I too did it but doesn't worth the effort I think).

PS: If you're living in Izmir and can visit me (DEU deniz bil.veTek.Enst. - close to Turkuaz-Inciralti), I can show you how it works with activex.






Re: Expecting Advise on A Graphics Problem

Tamar E. Granor

If you're in VFP 9, consider using the GDI+ stuff rather than the Line method. Check out the GDIPLUS.VCX in the FFC directory, as well as the GDIPlusX project in VFPX.

Tamar





Re: Expecting Advise on A Graphics Problem

Lord Arokh

Hi Cetin

I tried really lots of things. Some times capabilities of fox stepping on my nerves really. FORM doesn't treat the drawings like any other controls ( like labels,textbox ). So If there is just drawings on the form the scrollbars are of service. To use them I have to place an object out of view.

To overcome this problem I placed an invisible shape object on the form. And every time I zoom in/out I scale the shape object. It works. And yet another displaying problem occured. After 20x of zoom in, FORM becomes unstable. Drawings are starting to be distorted. :(

So before I give up, I tried on your advise. I searched ACTIVE-X especially magic word GIS, on the net and I found a site http://www.mapwindow.org/ .

These guys developed an ACTIVE-X object that can be use like a map. It's free. And It works just like I want it to work. So I'm going to try that way.

Thanks for your advise.

to Tamar E. Granor :

Hi Tamar,

I think that as I write above I'm going to try ACTIVE-X object way to implement. It is much easier that using GDI+ procedures... Any way thank you for your reply....

I would like to send my greetings for all who read and reply.