iAudiophile.net Forums
Go Back   iAudiophile.net Forums > Flash-Memory Players > Cowon D2/D2+ > D2 Themes, Tweaks And Anything Flash

Post New Thread  Reply
 
Thread Tools Display Modes
Old 07-28-2008, 17:28   #286
Mutterer
of mutterings
 
Join Date: Jun 2008
Location: Matiasovce, Slovakia
Posts: 123
Default

That was a fast response lhab,

I think you are right - a combination of the two methods would be great. Yours for fast, large level zooming and the other for 'focusing'.

If I had the skills I would have a go but I might just as well try and run the 100 meters in under 10 seconds - it ain't gonna happen

keep up the good work.......
__________________
D2 8Gb with 3 SDHC's -Toshiba 8Gb(class4), Transcend 8Gb + 16Gb (class6)
COWON leather case, stock and cheap KOSS earphones....(need dosh!)
SHINE(?), Mr. noMustache theme (Cassini)
Mutterer is offline View Mutterer's Photo Album   Reply With Quote
Old 07-29-2008, 09:50   #287
TackyTiger
Member
 
TackyTiger's Avatar
 
Join Date: Jul 2008
Location: UK
Posts: 141
Default

Quote:
Originally Posted by lhab View Post
There is no contradiction here. The equator is the circle of 0 degrees latitude, and its length in pixels in the local system is
real_length_of_the_equator_in_meters/(meters_per_pixel_at_some_latitude/cos(that_latitude))
Thanks for your patience - I understand now and am producing working config files for both projections. I should have some finished maps to release fairly soon.

Quote:
That's all I can think of for now, but if you have any questions, feel free to ask me, I'll be glad to share what knowledge I have.
Very kind of you.
TackyTiger is offline View TackyTiger's Photo Album   Reply With Quote
Old 07-30-2008, 06:03   #288
TackyTiger
Member
 
TackyTiger's Avatar
 
Join Date: Jul 2008
Location: UK
Posts: 141
Default Tweaked version of lhab viewer

I've posted some maps and a tweaked version of lhab's viewer here;

http://iaudiophile.net/forums/showpo...9&postcount=45

There's also a patch file in the zip against the second version of the source.

The only change I've made is to make the scale buttons a bit easier for big fingered freaks like me to press, and a new optional global config.txt parameter to align them to the right side of the screen (scaleside=right).
TackyTiger is offline View TackyTiger's Photo Album   Reply With Quote
Old 07-30-2008, 17:34   #289
lhab
Member
 
Join Date: Jun 2008
Posts: 80
Default

Quote:
Originally Posted by lhab View Post
Actually, we could have the best of both worlds: several maps, and the possibility to zoom in or out. I might add that feature some day.
OK, just did it, you can now zoom between 1/e and e. Here is the new version, including TackyTiger's patch.

Edit: new version. Changes:
- the volume buttons allow to cycle through the set of scales
- when clicking near the center of the zoombar, the zoom factor is rounded to 1, and clicking the button of the current map resets the zoom factor to 1
- a new config file, called mapoptions.txt is sought for in the current directory, its parent and grand-parent, allowing to specify the variables zoombarheight and scalebuttonside
- you can specify a mapdir variable in the toplevel config.txt, so that you no longer need to have 0, 1, ... directories in the directory containing the map.

Together, the first three changes make it easier to work without a stylus.
Attached Files
File Type: zip map.zip (18.1 KB, 0 views)

Last edited by lhab; 08-05-2008 at 19:46.. Reason: new version
lhab is offline View lhab's Photo Album   Reply With Quote
Thanks from:
Old 07-30-2008, 19:58   #290
TackyTiger
Member
 
TackyTiger's Avatar
 
Join Date: Jul 2008
Location: UK
Posts: 141
Default

That's great. Thanks for including the patch too.

I was having a go at getting smooth panning when you press the arrow buttons (like Chrieg's viewer). When I tried replacing Stage.height/width with 5 in the Main.as onArrow function, there was a delay after each refresh. I couldn't work out if this was imposed or if a lot goes on between every refresh (and this was the reason you'd chosen a whole screen as the value)? It's not that important though, I was just tinkering.
TackyTiger is offline View TackyTiger's Photo Album   Reply With Quote
Old 07-30-2008, 20:23   #291
lhab
Member
 
Join Date: Jun 2008
Posts: 80
Default

I chose the screen by screen panning in order to be able to move quickly through a large map. You can get mostly the same effect as what you are trying to get by dragging the map, even though I admit it is a bit less convenient. If you insist on having smooth panning, I think it would be nice to mix both approaches, say, by progressively accelerating the motion.

The effect that you describe is normal: when you keep a button pressed, it only performs its action every N frame. N is the "period" parameter in the constructor of the class MyButton (actually, the real period is N+1). The duration of a frame is defined in a.xml, with the "framerate" parameter (currently, 6 frames per second). So, if you want faster updates, you should alter the period argument used to create the arrows, in "Main.createArrowButton".
lhab is offline View lhab's Photo Album   Reply With Quote
Old 08-01-2008, 05:58   #292
xCross
iPod Hatred
 
xCross's Avatar
 
Join Date: Jan 2008
Location: Dhaka, Bangladesh
Posts: 59
Send a message via MSN to xCross
Default

hey, how to copy map from maps.google.com??
__________________
iPod what? iTunes who?

Cowon D2 4GB Black
vModa Bass Freq. Headphones
SanDisk 4GB SDHC Memory
Zenus Casing

xCross is offline View xCross's Photo Album   Reply With Quote
Old 08-01-2008, 06:22   #293
lhab
Member
 
Join Date: Jun 2008
Posts: 80
Default

I posted a script for that in message 279, which outputs the maps in the format understood by my viewer.

And here is a windows version. It is written in C#. You'll find a C# compiler somewhere below C:\Windows\Microsoft.NET\Framework\. On the last windows box I worked on, it was C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc. exe, but it may differ on your machine. To compile, rename the file to gmdump.cs, open a command prompt, and type

Code:
cd whereyouputgmdump.cs
whereiscsc.exe gmdump.cs
which produces a gmdump.exe.

Next, install Image Magick from here. My program needs convert.exe to convert the tiles from png to jpg (does anyone know if is there a way to do it from within .NET?), so you will have to put it in the PATH, or edit gmdump.cs and replace "convert" by "\\where\\is\\convert.exe" (and, of course, recompile).

Now, cd to where you want to store the map, and run

\where\is\gmdump.exe zoom longa lata longb latb

zoom is a an int between 0 (smallest scale) and 16 (largest scale), longa and lata are the coordinates of the upper left corner of the rectangle you want to download, and longb and latb those of the lower right corner. The coordinates should be given in degrees, as a decimal number. The eastern longitudes and northern latitudes are positive (in google maps, you can get the coordinates of a point using direction from/to in the context menu).

This script is slow, because it waits a few second between every tile. Otherwise, I fear google might detect what you are doing, and ban your IP.
Attached Files
File Type: txt gmdump.txt (3.5 KB, 0 views)

Last edited by lhab; 04-15-2011 at 16:54.. Reason: new version
lhab is offline View lhab's Photo Album   Reply With Quote
Old 08-01-2008, 08:36   #294
[NuP]D2
Member
 
Join Date: Jul 2008
Location: Switzerland
Posts: 81
Default

Quote:
Originally Posted by xCross View Post
hey, how to copy map from maps.google.com??
Post #92 from Chrieg
Quote:
Originally Posted by Chrieg View Post
there is a program called Google Maps Downloader but it's shareware and the trial version has a limit to the zoom factor. However, I figured out another way to do it. Have a look.

öhm... Hi @ all... I think, it's my first post here ;-)
Great Forum... I really like it.
[NuP]D2 is offline View [NuP]D2's Photo Album   Reply With Quote
Old 08-02-2008, 03:47   #295
Setrix
Junior Member
 
Join Date: Sep 2007
Posts: 27
Default

Quote:
Originally Posted by lhab View Post
zoom is a an int between 0 (smallest scale) and 15 (largest scale), longa and lata are the coordinates of the upper left corner of the rectangle you want to download, and longb and latb those of the lower right corner. The coordinates should be given in degrees, as a decimal number. The eastern longitudes and northern latitudes are positive (in google maps, you can get the coordinates of a point using direction from/to in the context menu).
First, by smallest scale do you mean the most zoomed in? I get confused when it comes to words arranged like that, lol.

Second, I couldn't figure out where to find the longitude and latitude coordinates of a location. A little more explanation on that please?
Setrix is offline View Setrix's Photo Album   Reply With Quote
Old 08-02-2008, 04:09   #296
lhab
Member
 
Join Date: Jun 2008
Posts: 80
Default

Quote:
Originally Posted by Setrix View Post
First, by smallest scale do you mean the most zoomed in?
Indeed.

Quote:
Second, I couldn't figure out where to find the longitude and latitude coordinates of a location. A little more explanation on that please?
Right click on the point on the map, choose "Directions from here" in the menu, and you get two extra input fields on the left, the first filled with the coordinates of the point you clicked. Beware that the latitude is given first, while in my program, you have to give the longitude first (if that annoys you, just swap the args[i] at the end of the code).
lhab is offline View lhab's Photo Album   Reply With Quote
Old 08-04-2008, 11:53   #297
RomD
Junior Atheist
 
RomD's Avatar
 
Join Date: Jul 2008
Location: Bavaria, Germany
Posts: 6
Default

Thanks to all contributors, this app is awesome.
The C# program to get the maps from Google works perfectly on my Windows Vista machine, too.

However, there are some things I would like to have added/improved:

-Bigger buttons (and bar): I don't use the stylus so I'd like to have slightly bigger buttons and arrows to make thumb navigation easier. Though it's already possible to do so I find it a bit hard to hit the right spot. Since the buttons and the bar are transparent there's not much of a loss in displayable area.

-"Reset zoom"-button: After using the zoom bar I have problems going back the default level and the map remains grainy. A simple button to reset it to the initial value would be helpful.

-Markers: Similar to Google Maps. You have two buttons which add/clear marker A and B to/from the position of the map which is currently in the center of the screen. The markers would have to stay the same size no matter which zoom level or sub-map you were in. Would be helpful if you used the app for navigation to make tracking of the starting point and destination easier.
RomD is offline View RomD's Photo Album   Reply With Quote
Old 08-04-2008, 20:09   #298
TackyTiger
Member
 
TackyTiger's Avatar
 
Join Date: Jul 2008
Location: UK
Posts: 141
Default

I've uploaded a version of lhab's viewer (map.zip) with very slightly bigger scale buttons, a taller narrower zoom slider and the function that if you press the currently displayed scale button, it will reset the zoom.

I did try and go bigger, but I think this is the best trade-off. It's very easy to build a new version, have a look at the attached patch file (mapv2-patch.zip) to see which files/ lines to change. The pain with it is Flash on the D2 seems to render slightly differently to the Adobe viewer, so you have to keep mounting/copying/unmounting/utilities/flash/etc. Maybe someone has a solution to this?

Something I found - just click once, quickly with your thumb and don't wait for the scale to change. Flash seems to interpret a long click as a drag.

http://www.mtasc.org/
http://swfmill.org/
Attached Files
File Type: zip map.zip (5.9 KB, 0 views)
File Type: zip mapv2-patch.zip (948 Bytes, 0 views)
TackyTiger is offline View TackyTiger's Photo Album   Reply With Quote
Thanks from:
Old 08-05-2008, 06:32   #299
lhab
Member
 
Join Date: Jun 2008
Posts: 80
Default

Quote:
Originally Posted by TackyTiger View Post
the function that if you press the currently displayed scale button, it will reset the zoom.
Quite clever!

Quote:
I did try and go bigger, but I think this is the best trade-off.
I was thinking of having only + and - buttons. That way, we could make them as big as we like. There could be an option in the map to choose between both modes. For the zoom bar, there could be height option.

Quote:
The pain with it is Flash on the D2 seems to render slightly differently to the Adobe viewer, so you have to keep mounting/copying/unmounting/utilities/flash/etc. Maybe someone has a solution to this?
I think I remember Adobe distributes a flash lite simulator for windows. I haven't tried it (I don't have windows, and running wine, when it works, is almost as much of a pain as uploading something on the D2), so I can't be sure it really behave's like the D2's interpreter.

Quote:
Something I found - just click once, quickly with your thumb and don't wait for the scale to change. Flash seems to interpret a long click as a drag.
I am a bit surprised, since you have to explicitely call the startDrag method in the code, and I don't do that for buttons. What problem do you have when clicking for a long time?
lhab is offline View lhab's Photo Album   Reply With Quote
Old 08-05-2008, 08:54   #300
tirim4
Veteran
 
tirim4's Avatar
 
Join Date: Jul 2007
Location: Sweden
Posts: 2,287
Default

Quote:
I was thinking of having only + and - buttons. That way, we could make them as big as we like. There could be an option in the map to choose between both modes. For the zoom bar, there could be height option.
Why not use the + and - buttons that allready are ON the D2 and dont take upp screenspace?
__________________
DAP: Cowon S9 32 GB titanium|D2 4gb black -totally/partly dead- | Headphones: AKG K66 | IEMs: Sony MDR EX300 | UCI: Chakra|Aero Music|Klaus Browser|Flow Browser|Klaus Video UI

"I'm the funky monkey junky, You're a flunky bunky donkey"
tirim4 is offline View tirim4's Photo Album   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 19:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.


Copyright © 2006-2011 CrowdGather |  About iAudiophile |  Advertisers | Investors | Legal | Contact