yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] _LEM_:
Ok, I fixed the first 2 problems.

New client available.

I also changed the file requests.php
[Windows Mobile Apps and Games] tcrichton:
Genius

Thanks for a great app staryon, I was just about to try and work out how to hack a gps data -> server app together for my phone and you've already done it (and a million times better than I could!)

Thanks for putting the time into this project! I hope to get alot of use out of it and will credit you if I do anything public,

Thanks again!

Tristan.
[Windows Mobile Apps and Games] wafwot:
Here's a PHP function I wrote a while ago for resizing GIF images that are wider than 200 pictures. I use it to resize images I get from my State's DOT web page so they're readable on my phone. At the moment, it only does GIF images (since my State uses GIF images for most of it's traffic images). Give me 10 hours or so (I have to go to work), and I'll get it working for jpegs and pngs.

To use it I call <? include("resize.php"); ?> in my php file, then use the function as follows in my html code:

<img src="resize.php?img=http://images.wsdot.wa.gov/nwflow/vms/vms-165.gif" />

Below is my "resize.php" file, which is nothing but one function. PHP 4 and GD 2 support is required.

<?php

// The file
$filename = $_GET['img'];
$percent = $_GET['pct'];
$w = $_GET['w'];
$h = $_GET['h'];

// Set a maximum height and width
if (!$w)
$width = 220;
if (!$h)
$height = 1000;

// Content type
header('Content-type: image/gif');

// get image size of img
$dimarr = getimagesize($filename);
// image width
$width_orig = $dimarr[0];
// image height
$height_orig = $dimarr[1];

$ratio_orig = $width_orig/$height_orig;

if ($percent) {
$percent = $percent * 0.01;
$width = $width_orig * $percent;
$height = $height_orig * $percent;
} else {
if ($width/$height > $ratio_orig) {
$width = $height*$ratio_orig;
} else {
$height = $width/$ratio_orig;
}
}

// Resample
if ($percent OR $width_orig > $width OR $height_orig > $height) {
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromgif($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);

} else {
readfile($filename);
}

// Output
imagegif($image_p);
?>
[Windows Mobile Apps and Games] odie3:
Thanks that works and makes things helpful!

On the Export Data get data sorting, do you mind sorting by newest first?

Also, on the menu you have Config first do you mind moving that just above the About? I do not believe I have changed anything since installing trackme, so it being at the bottom seems like a good idea.

One more request (since I seem to be on a roll). When getting the Icons for uploading a position - could the list be cached locally so you do not have to get them every time?
[Windows Mobile Apps and Games] jcleek:
Staryon I updated the files. Same location as before. Current version is 1.10.

Changes:

1) Added image support

If there is an image URL in the database then a 200px wide tumbnail is displayed in the information bubble. Clicking on the image opens the original image in its full resolution in a new browser window. I did not force a custom icon like a camera so you can use whatever icon you want to set.
[Windows Mobile Apps and Games] odie3:
Nice jcleek - look forward to the new index code! Thanks for the quick update.
[Windows Mobile Apps and Games] _LEM_:
Thanks a lot for your comments! :)
[Windows Mobile Apps and Games] _LEM_:
Thanks. I just uploaded the new files.
[Windows Mobile Apps and Games] _LEM_:
[EDITED ALL MY THOUGHTS AND ADDED MY FINAL CONCLUSION] :D

It's a kml file, so we cannot include any php there. It's not going to work because

it needs to be pure html.
[Windows Mobile Apps and Games] _LEM_:
I don't store creation sdate with the trips, so at this moment I can just order by name.

hmm... I use that all the time, when I create my new trips.

Sorry but I don't think I will change that by now.

Come on... it doesn't take so long, just 1 sec or so. And you don't need to reload them again if you close that window. :)
[Windows Mobile Apps and Games] odie3:
Okay, understood.

I disagree, over time it is a lot of extra clicking for something that has not changed (and may not change very often at all). Then while you (assuming) and I have unlimited data - not everyone does. So that is eating data for no reason at all.
[Windows Mobile Apps and Games] odie3:
Okay using the new code, however is the picture suppose to be bigger than the bubble (and some what outside of it too)?

Also, what are your thoughts about adding a filter on the current trip that is loaded to only show points that have pictures, custom icons, and/or comments? My newest trip has the start point and point 2 (which has a custom Icon and picture) but I can not it to show up. This is because the start point and point two are right on top of each other and no matter how I try to click on the Camera Icon (point two), point one information always comes up. :(

In Google Earth this is not an issue, since it will expand out points that are on top of each other, allowing you to click on the one your want to view.
[Windows Mobile Apps and Games] odie3:
staryon - check your paypal account sent you another payment for your added support for picture uploads.
[Windows Mobile Apps and Games] _LEM_:
thanks a lot man!! I really appreciate it.
[Windows Mobile Apps and Games] _LEM_:
lol... you were telling me a few posts before to increase the size limitation that TrackMe has for uploading images because 400 KB was not enough!! :p

The trip list is not more than a few bytes!
[Windows Mobile Apps and Games] odie3:
Very true but I was speaking of users that do not have unlimited data plans. I was just trying to bring home a different reason to change the behavior of getting the Icon List. I am not trying to be silly or counterdict myself but to show more than one reason why I think it is a good idea to change it.

My real job is Software QE and I often have to give more than one reason to have something changed in our software - so I am just looking at additional angles to get my request to be seen as reasonable. :)
[Windows Mobile Apps and Games] jcleek:
The bubble is at least 400px wide because that is the defined size of the HR lines. The thumbnail image is hard coded to 200px wide. So unless your browser is having a bad day or I somehow used code not compatible with your browser there is no way a 200px wide thumbnail extends outside the border of a 400px bubble. Additionally, the bubble size is dynamic and will grow to accomodate all of the information it contains. I do not define the bubble size.

Got an example we can see?

As for showing only those points that have photos I can add that option but this is now becoming far more complicated. Do you want to be able to load a trip and then only load the photo points? Because you add a significant amount of decision and code to do that...
[Windows Mobile Apps and Games] odie3:
Attached are two pictures, one showing two points and one showing where my picture is outside of the bubble. However, I found that this does not happen every time. Matter of fact I had trouble recreating it. So, it could be just the browser having a hard time.

Yes, I am thinking when you load a trip, then you would have a option to filter all the normal points out (a button?) and it would show only points with extra/added meta data.
[Windows Mobile Apps and Games] jcleek:
Not much I can do about the bubble because it is the API from Google that controls the bubble size. And as you indicated even you have a hard time reproducing. I agree it is a browser or server issue and not my code. As I think about it, it is probably a case of the information not getting to the browser fast enough to be complete before the API draws the bubble. Maybe try to move the pics to another server and see if it changes.

The filter is not as easy as you make it out to be. And do I filter based only on photos? How about comments? Custom icons? All kinds of options but how do you give so many nested options? Again, more complicated code means harder to manage and less likely to get used. Unless someone else believes this is necessary I am going to have to decline to do this one. I just see it as not needed and overly complicated.
[Windows Mobile Apps and Games] odie3:
Filter would need to work on Photo and/or Comments. If it is just a custom Icon and no photo/comment there is no point, IMO.

As for not needed - well I somewhat disagree (but do agree that it might end up being complicated to code). If you never forced a update with Picture/Comment when you first turned on Trackme then you are mostly okay. However I see myself turning on TrackMe, then Force Updating to get a Picture/Comment (where you will get two positions on top of each other). Then of course if you are only walking around there is not a lot of position updating going on (depending on your settings) and are more likely to have two or more position very close together.

This is IMHO and in no way am I demanding a change your index.php file. I am very happy to have what your have created for all of us.
[Windows Mobile Apps and Games] teren:
Staryon - this program has completely exceeded my expectation! I am a pilot and have been using this to see the track I fly and to see how fast and what altitude I was at at any given moment in my flight - fantastic information! (In your own airplane, consumer electronics are allowed!) So I have donated to you as a sign of thanks for your hard work! Keep it up! (And thanks to everyone else who has contributed to this project - I know it could not have been done with out all your help!

If anyone wants to see the tracks I'm making with my car & airplane, here ya go! http://www.photosfrombelow.com/trackme

Thanks Again!

Chris
[Windows Mobile Apps and Games] _LEM_:
First at all, *THANKS A LOT* for the donation.

I'm very happy that you used TrackMe in a such different environment than I'm used to. The map looks great!! I would like to ask you if you are ok if I take some snapshots of that map to show it in the documentation of the program. I love the track around the island! Thanks!
[Windows Mobile Apps and Games] odie3:
Okay, that is one freaking cool TrackMe track!
[Windows Mobile Apps and Games] teren:
By all means! Help yourself! If you look at some of the earlier tracks, you'll see more distance in flights.

I love this application!
[Windows Mobile Apps and Games] _LEM_:
Thanks !! :)
[Windows Mobile Apps and Games] _LEM_:
It seems to be a limitation with the API. It only shows files from My Documents from the main memory. I'm afraid that there is nothing I can do, unless I write my own component which is too much work...

You will have to move the pictures that you're interested in to My Documents but in the Main Memory.
[Windows Mobile Apps and Games] odie3:
Yucky! However, thanks for trying! ;)
[Windows Mobile Apps and Games] wafwot:
There should be no php in the kml, correct, but there wouldn't be any php code.

You can save the ImageURL as:

http://www.domain.com/trackme/resize.php?img=http://www.domain.com/gps/pics/user052048.jpg

This would automatically resize the image when it's displayed. The PHP does the resizing on the fly, on the server. The resize.php file would go in the same directory as the upload.php, gm.php, index.php, etc.

I have reworked the PHP code to accept GIF, JPG, and PNG files... if you're interested.
[Windows Mobile Apps and Games] jcleek:
Ok Odie, I spend the last 5 hours working on the code but I am pretty sure I have the filter option you wanted.

Staryon, the file has been updated and is in the same place.

Current version is 1.11. Changes:

1) Added filters for Photo, Comments, and both

2) Language.php file added 5 variables that need translations:

$filter_button_text

$filter_none_text

$filter_photo_comment_text

$filter_photo_text

$filter_comment_text
[Windows Mobile Apps and Games] _LEM_:
[EDIT]

Please see my next post.
[Windows Mobile Apps and Games] _LEM_:
files updated
[Windows Mobile Apps and Games] odie3:
Wow, was not expecting it at all! However, works perfectly!

:):):)
[Windows Mobile Apps and Games] _LEM_:
wafwot,

I prefer to store only the URL of the real image in the ImageURL field of the database (so I keep it consistent with the icons)

When a KML is generated I want it to be as independent as possible of the site that created it.

Otherwise, there are a few problems:

1. When somebody opens KML file, every time an image is displayed they will be accessing my site, even if the uploaded picture is not stored there.

2. If the location of the PHP files changes and they are placed in a different place, the old pictures will still have the reference to my previous locations so they will not be displayed.

I could store only the url of the image, and when the kml file is generated add the location of the resize.php file, but that information is not something that

I pass in the URL when trackme sends a request.

I mean, everything is doable. I could pass that information in the request, but I don't want to make it more complicated.

I will think about it and I'll try to see if there is an easy way of adding the function but I want to keep TrackMe as simple as possible.

I really really appreciate your help!!
[Windows Mobile Apps and Games] wafwot:
Okay, let's forget the KML file for the moment, and worry only about the web interface. Maybe the KML file should only store the image URL, and nothing else. Anyway, modifying the web interface was actually pretty easy.

To test it, I made a fake trip and added two positions. One has a large image, one has a tiny image. I only stored the uploaded image URL in the database as you currently do, but modified the index.php file as follows:

if($row['ImageURL']) {
$html .= " <tr><td colspan=\"2\"><a href=\"" . $row['ImageURL'] .
"\" target=\"_blank\"><img src=\"http://www.wafwot.com/gps/resize.php?img=" .
$row['ImageURL'] . "\" border=\"0\"></a></td></tr>";
}

I added the URL of my resize.php script to the img src. The code resizes the image link stored $row['ImageURL'] on the fly. It doesn't store a smaller file on the server. The results can be seen here:

http://www.wafwot.com/gps/index.php?ID=222&trip=122

The resize.php script doesn't have to be on the luisespinosa.com server. It could be distributed just as the other server files (index.php, gm.php, upload.php, etc.) are currently. If the file is distributed with the TrackMeServer package, then the resize.php can be called without the URL, like so:

if($row['ImageURL']) {
$html .= " <tr><td colspan=\"2\"><a href=\"" . $row['ImageURL'] .
"\" target=\"_blank\"><img src=\"resize.php?img=" .
$row['ImageURL'] . "\" border=\"0\"></a></td></tr>";
}

You can also pass custom variables to the script, variables which could be stored in the config.php file. Adding w=75 to the resize url, would force the images to be displayed at 75 pixels wide... like so:

if($row['ImageURL']) {
$html .= " <tr><td colspan=\"2\"><a href=\"" . $row['ImageURL'] .
"\" target=\"_blank\"><img src=\"resize.php?w=75&img=" .
$row['ImageURL'] . "\" border=\"0\"></a></td></tr>";
}

(There are several places in the index.php where ImageURL is called and displayed. I only copied one instance of it for this example. Here's a test page showing how the img tags are used with the resize.php script: http://www.wafwot.com/m/dot/imgtest.php)
[Windows Mobile Apps and Games] jcleek:
I can include the resize code but is there a real need? As I have it now on the web interface the thumbnail is set to a width of 200. That is pretty small and I am not aware of any camera that takes photos that small so there should not be a photo thumbnail that has to be stretched to make it 200. When you click on the thumbnail it opens the full image in a new window: again no reason to resize.

Am I missing something?
[Windows Mobile Apps and Games] jcleek:
Ah hah! I finally see the image overlap Odie was talking about. It absolutely is a server/browser issue. If the server doesn't render the box content fast enough the box isn't large enough. Where this is really seen is when images are added to points as the images take longer to render.
[Windows Mobile Apps and Games] _LEM_:
I think you're right. Maybe we are complicating this too much...
[Windows Mobile Apps and Games] wafwot:
Resize Pros and Cons

Well, here's one good reason. The TyTn II/Tilt/Kaiser phone has a 3 megapixel camera. If you have the camera set to take large high-quality pictures, a 3MP image can get pretty big. By using HTML to force the image size, you're still downloading the entire 3MP image, but displaying it in thumbnail size.

Using the resize script, the images are much smaller because the resolution is small.

Take the image of Deception Pass Bridge in my test trip.

http://www.wafwot.com/gps/pics/wafwot052048.jpg

That image is 2155x1592. That's a 3.5MP image. The size is 3.6 megabytes. That's a lot of image to download just for a thumbnail.

The resized thumbnail is only 6 kilobytes. In the words of Forrest Gump, that's all I got to say about that.

http://www.wafwot.com/m/dot/resize.php?img=http://www.wafwot.com/gps/pics/wafwot052048.jpg

The only time the viewer would have to download the entire image is if they want to see the full-sized image and clicked on the thumbnail. I'm on a 1 gigabit internet connection at work, and a 6 megabit circuit at home. Downloading 3.6 MB is no big deal for me. But what about the people on the $20 a month "entry-level" DSL circuit that only gets 768kbits to 1.5kbits? At 1.5kbits, a 3.6 MB image would take about 21 seconds. A 6 KB image would take about 3/100th of a second. I seem to recall a 400 KB limit, but 400 KB is still 66 times more data than needed.

I feel like I'm on a Senate Committee trying to get a defense budget approved. Ultimately, it's your program, and your imterface. There was a request for image resizing, and I just happened to have written something for a completely different project that I knew would help. I don't want to step on any toes... so I'll just leave good enough alone. No sour grapes here... You guys are putting together a great product, and I will continue to follow it and help out where I can.
[Windows Mobile Apps and Games] _LEM_:
wafwot,

I know how you feel. I have been in that situation where you have to convince people about things (program design, sql schemas) that were so obvious to me!

I agree in most of what you say. It's just at this moment I prefer not too complicate it too much. I don't know if you have already tried to upload an image with TrackMe, but for this current version you cannot upload images bigger than 400KB. I will probably be increasing that value, but 3MB I think it's too much.

Let me tell you that my original idea was to resize the images BEFORE they got uploaded. You save bandwith, space on your server (AND MINE where I have 900 users!) and it's faster. I already had a function to resize images and it was working great, however the algorithm was not good enough when the image was too big, because it needs to be uncompressed on your PDA and I was getting Out of memory exceptions sometimes. However, if I can improve the algorithm I will put it back. I think this would resolve all the issues.

Once again, I really appreciate your help and it's great to have people like you contributing to a project like this! I'm not saying we won't add what you proposed, it's just let me see if I can find a way of resizing the images before which was always my first thought.

Thanks
[Windows Mobile Apps and Games] jcleek:
Please don't feel that way. I didn't see a need to resize. Then again I have broadband at home and do not plan on actually uploading photos from my Kaiser. Your scenario just didn't make sense to me until your last post. Sometimes I am not the smartest guy and have to have things explained to me a couple of times before I get it.

I will look at resizing the thumbnail but don't want to change the full image view.
[Windows Mobile Apps and Games] _LEM_:
jcleek, next version will resize the images automatically before uploading them. So there is not need for doing this.
[Windows Mobile Apps and Games] _LEM_:
New version available.

- New 'Manage trips' tool. From there you add, rename or delete existing trips.

- When uploading images, you can select pictures either from main memory or

from the storage card. You will also see thumbnail so you now what you are

going to upload.

- Images are resized automatically before uploading to the server.
[Windows Mobile Apps and Games] _LEM_:
I just made some cleaning in the generated CAB file, and I have got rid of some DLLs that are not needed.

I just uploaded a new version again.

My recommendation is that you guys uninstall the program and delete the folder TrackMe (you can make a backup of the config.dat and local.sdf files) so you will have a fresh and clean copy of TrackMe.
[Windows Mobile Apps and Games] odie3:
Nice new Manage Trips!! BTW, can we say click yes once to the delete rather than for everyone trip that you select (in my case I just selected/deleted ~15 trips).

Wow, you found a way to get to the Storage Card! Great job on that and thank you very much for not giving up (I thought you had)

Problem:

When I deleted the test trips with Picture uploads, the pictures in trackme\pictures\ did not get removed. I am thinking you should delete the picture if the trip is getting removed too.

It is also nice that I can upload any of my 3mp pictures, however I am sad that the full version is also resized. This pretty much leaves sharing the pictures with family/friends for printing.
[Windows Mobile Apps and Games] wafwot:
Wow.

We need to get on the same page.

From previous posts, leaving the original image alone seemed to be a priority, now the images are resized BEFORE being sent to the server.

I think resizing before send is a great feature. However, it should be an option. If you're sending to Staryon's server, you shouldn't get a choice.

For example, let's say a new option (maybe a new option tab) for resizing images was added to the TrackMe program. Here's what I think would make ImageURLs functional for everyone:

The settings on the "Images" tab would only be visible/settable if your server IP is not set to luisespinosa.com. Maybe another checkbox on the Remote tab called "Use public server" that would automatically fill in the server info and Image settings so images are always resized before being uploaded. If the "Use public server" checkbox is checked, then the Images tab settings would be hidden (like the advanced settings) or replaced with a note stating image options are not settable on the public server. Just ideas.

If the Remote options are set to use a custom/personal server, then the Images options are configurable. Options could include a checkbox to resize before uploading, dimension for resized images, etc. This would allow people who don't have unlimited data plans or slow EDGE network connections to control how images are uploaded.

And I won't even go into a new option in the config.php file for resizing originals on the fly... :D

Like I said... these are just suggestions. Take 'em or leave 'em. I'm heading over to PayPal now...
[Windows Mobile Apps and Games] _LEM_:
Thanks for your suggestions guys. ;)

I will leave as it is for a while. It was really a pain to get the uploading thing to work (servers are very picky when uploading stuff) and also find out how to show the images from the storage card. I'll take a break about all this stuff about images. I'll move to other things now for a while.

ok, I have a question.

IS THERE ANYBODY USING LOCAL STORAGE WHEN STORING GPS POSITIONS?

Every time that I add something to TrackMe I have to create 2 versions, one for remote and one for local. Even if you choose local sometimes you need the server...

I don't like all this too much and I'm thinking in getting rid of the local storage.

You would still have the option to store offline data though.

So if people are not using this I will get rid of that. I think it's also a little bit confusing for new users.

What do you guys think?
[Windows Mobile Apps and Games] turtle2472:
I have been using it for a little bit and I never store locally. Right now I'm using your server but will likely move to my own in the near future.