![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Code Samples & Tips Share your recent discoveries and ideas with other users. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
The attached code draws an image on the form's fore layer which can be moved by dragging the image with the mouse (or pen).
Edit: Missing image file added.
__________________
Basic4ppc reference list |
|
|||
|
Thanks for the example.
I'm currently writing a OpenStreetMap/GoogleMaps Tile viewer. The user should be able to scroll the map around and I'm just thinking about how to do this. The first problem is that I have not one image but the map is created from many tiles of 256x256 pixels. My thoughts here are that I have one image object for displaying that can be moved around as in your example. If the user releases the mousebutton/stylus then the program rebuilds the content of the display image object by copying the bitmaps of all needed map tiles to the right positions and then center the display image again on the screen. So the user can drag it again. Does anybody have some other idea on how to glue the map tiles together to a whole image? Now I have tested your example code with moving a fullscreen size image (240x320 on my device) around with displaying the image while moving. This is far too slow for my application. Are there any hints how to speed this up? Thanks a lot Markus |
|
||||
|
1. Where do you get the images from( file, internet?) Are they saved locally?
2. Speed: - Did you try to compile? it accelerates things a lot. - You can try to hide certain parts of the image and move a smaller part - is it feasible in your case?
__________________
Basic4ppc help and documentation |
|
|||
|
Quote:
I have written a download tool for OpenStreetMap tiles (PDA TileManager) and I want to add a viewer for the downloaded tiles. Tiles not found on disk then should be displayed as a grey box or something. Quote:
Compiling the test program is not really much better. Thanks, Markus |
|
||||
|
I guess in the meanwhile you can draw blank (white) space on the part of the screen where the user dragged the map from, and right when the map is released you could draw the missing parts. The sample Erel had shown uses FDrawImage, but other drawing methods found in additinal libraries here (I'm not sure which) should be faster, and you can try it later.
__________________
Basic4ppc help and documentation |
|
|||
|
Hi klaus,
thanks for your example. I took it as a base to play around with and I've attached my result to this message. The program simply glues 9 map tiles of 256x256 pixels together to one image and this is displayed on the screen and can be moved around with mouse/stylus/finger. I found out that updating UI-Controls in the MouseMove event sub (like displaying the current coordinates in labels) slows down everything a bit. After removing the labels displaying the coordinates the movement with stylus/finger is much smoother. Compiled with the optimizer the speed is really smooth now. I think this is a base I can work on for my program. Now I have a better understanding of how Image handling and manipulation works in b4ppc. Thanks very much for your help. This forum is really invaluable. Markus |
|
|||
|
Some time ago I bought shareware GPS mapping program GPSDash (see GPSDash 4 PocketPC).
The relevance is that it offers a map geo-calibration and tiling program that runs on the PC; the tiles are then copied to PPC for display. Unfortunately I find a number of its moving-map features annoying although it is generally a very polished program. It also appears to be stagnant with no new releases for several years. But you might find it interesting to download, play with and plagiarise! Mike. |
|
|||
|
Quote:
You can find some URLs of other TileServer on the above Homepage under the "Maps" section. If you want to know how to calculate the tile numbers look here. If you have further questions just ask me but I think then we should open a new thread or do this by PM. Greetings, Markus |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AutoScaled Mouse X and Y not integers | agraham | Bug Reports | 7 | 07-30-2009 09:03 AM |
| Mouse OutSide A Form | eww245 | Questions & Help Needed | 9 | 07-15-2009 06:27 AM |
| getting mouse coordinates | enonod | Questions & Help Needed | 8 | 06-28-2009 07:10 PM |
| Image Mouse events | LineCutter | Basic4ppc Wishlist | 1 | 05-19-2007 10:24 AM |
| Move an image inside an image control | Cableguy | Questions & Help Needed | 5 | 05-14-2007 07:40 PM |