[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Adam Edell via DotNetMonster.com

1/11/2005 9:40:00 PM

Hi everyone,

I have a doubt about one thing and it will be very helpfull if someone knows the answet and some gudilines to the solution.

I'm developing application for the Pocket Pc. Application need to deal with GPS. On the device, on smart card will be map, about 80MB big.
I can use the whole map(!?!?!) or I can get it for using in equals regions parted.These regions(parts) I need to draw on screen intelligently so to the user it looks like scrolling the map.

My question is, which solution is better for this purpose(aplication speed, flickering free..)?

1.using PictureBox control and deal scrolling thru control
2.meet drawing and scrolling with my own control or something using GDI+

I am using Visual Studio 2003 and C#

thanx

Marko

--
Message posted via http://www.dotnetm...
4 Answers

Gerald Hernandez

1/11/2005 10:50:00 PM

0

From my experience, generally using tiled maps is better than the whole map
for performance reasons. You load just the pieces you need instead of the
whole thing at once. However, this is the more complicated solution. It is
of course the performance vs ease of coding dilemma, they are generally
mutually exclusive of each other.

A couple questions. What format are the map files? Are they vector, raster,
or both? Might you be reinventing the wheel? Most major GIS providers
provide PocketPC controls that already do what you are proposing.

Gerald

"marko v via DotNetMonster.com" <forum@DotNetMonster.com> wrote in message
news:8030a08d4e29431394c07729adfcc45a@DotNetMonster.com...
> Hi everyone,
>
> I have a doubt about one thing and it will be very helpfull if someone
knows the answet and some gudilines to the solution.
>
> I'm developing application for the Pocket Pc. Application need to deal
with GPS. On the device, on smart card will be map, about 80MB big.
> I can use the whole map(!?!?!) or I can get it for using in equals regions
parted.These regions(parts) I need to draw on screen intelligently so to the
user it looks like scrolling the map.
>
> My question is, which solution is better for this purpose(aplication
speed, flickering free..)?
>
> 1.using PictureBox control and deal scrolling thru control
> 2.meet drawing and scrolling with my own control or something using GDI+
>
> I am using Visual Studio 2003 and C#
>
> thanx
>
> Marko
>
> --
> Message posted via http://www.dotnetm...


Adam Edell via DotNetMonster.com

1/12/2005 7:22:00 AM

0

Map is the simple bitmap with size about 80MB.
Client told me that he has that map in corel file.He has also an simple application that cut map in similiar pieces. Map can be in one or multi parts in any graphic that I like. Map logic and vectors(points of interest, streets, ) is in Access base.

So, what I see, if I recieve cut map in pieces(probably I have to, because of the size) I need applicaton logic who will read next part of map and prepare it in memory so when I scroll to that point, I draw that part on the screen (!?!)

So, I am in dilema, is it PictureBox and smooth sliding(scrolling) is enough or let me put this way, do I have with PictureBox and this technique enough performance or I have to use pure GDI.

Or maybe is better solution to draw one part, and min. scroll is the
size of the screen in one direction (directly drawing second part(drawing only one part at the time without scrolling pixel to pixel)

marko

Thanx for the reply

--
Message posted via http://www.dotnetm...

Gerald Hernandez

1/12/2005 4:47:00 PM

0

hmm... sounds like there are a number of other things you need to consider
as well.
For now, I suggest you go ahead and try it with just one big picture.
In the future, you will probably want to cut the map into a grid, and the
reasons for that will become apparent as you progress.
There is one big question, is the user supposed to be allowed to zoom
in/out? This changes things.
In general, you will need to relate the geograhical extents of the map to
the current location view.
This involves what area of the picture to display based on the GPS
coordinates and the view range.
If the user cannot zoom in/out, then the view extents will remain constant
and things are pretty easy.
If they can zoom, then the extents of the view can change and so do a lot of
other things. Scaling of the image becomes a big one.
You will then need to deal with some vector math. Actually, you will need
some of that anyway, but it gets more complex if the zoom range is variable.

With all do respect, at this point in the process you have a number of other
issues you will need to address before you can concentrate on performance. I
suggest you find the easiest way to get it "working", then concentrate on
the areas that require better performance. Having done what you are trying
to do, but with much more complexity, I can assure you there is a whole lot
more to it than just displaying a picture and panning around. Especially
when you are talking about bringing GPS into the mix and making it work on a
PocketPC.

Gerald

"marko v via DotNetMonster.com" <forum@DotNetMonster.com> wrote in message
news:253e6420c6b141979b0bec63d061bc85@DotNetMonster.com...
> Map is the simple bitmap with size about 80MB.
> Client told me that he has that map in corel file.He has also an simple
application that cut map in similiar pieces. Map can be in one or multi
parts in any graphic that I like. Map logic and vectors(points of interest,
streets, ) is in Access base.
>
> So, what I see, if I recieve cut map in pieces(probably I have to, because
of the size) I need applicaton logic who will read next part of map and
prepare it in memory so when I scroll to that point, I draw that part on the
screen (!?!)
>
> So, I am in dilema, is it PictureBox and smooth sliding(scrolling) is
enough or let me put this way, do I have with PictureBox and this technique
enough performance or I have to use pure GDI.
>
> Or maybe is better solution to draw one part, and min. scroll is the
> size of the screen in one direction (directly drawing second part(drawing
only one part at the time without scrolling pixel to pixel)
>
> marko
>
> Thanx for the reply
>
> --
> Message posted via http://www.dotnetm...


Adam Edell via DotNetMonster.com

1/12/2005 11:18:00 PM

0

Thanx a lot Gerald
Your advices are very good.
My dillema was because I wasn't sure which method is better and I was afraid to go too much in wrong direction, but if I do not try anything, nothing will happen anyway

Hope I will not post anymore :) on this subject
(read:progress with application is just fine)

greetings

Marko

p.s. Happy New Year and holidays

--
Message posted via http://www.dotnetm...