Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change icon #41

Closed
bospre opened this issue Nov 24, 2014 · 34 comments
Closed

Change icon #41

bospre opened this issue Nov 24, 2014 · 34 comments
Labels

Comments

@bospre
Copy link

@bospre bospre commented Nov 24, 2014

So here ist my feature request, as you wanted me to open a new issue.

It would be nice if the icon of the tracked item could be changed.
Just now it is some kind of double triangle, which, I guess, is easily drawn.
I would like to change this icon in some kind of symbols e.g. for car, truck, motorcycle, bicycle, boat and so on.
Sorry for my description, I hope you can understand now.
Sincerely
Boris
I try to attach two pictures:
icon1

icon2

@vzoltan
Copy link

@vzoltan vzoltan commented Nov 24, 2014

+add a possibility to add custom icon (upload)

@Jeferex
Copy link
Contributor

@Jeferex Jeferex commented Nov 24, 2014

I think the link to uploaded custom icon should be stored in devices tables because each device should have its own icon.

@vzoltan
Copy link

@vzoltan vzoltan commented Nov 24, 2014

@Jeferex +1 :)

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Nov 24, 2014

Actually there should be five icons:

  • latest not selected (red)
  • latest selected (green)
  • latest offline (white)
  • archive (blue)
  • archive selected (gold)

Thus, I am thinking about hard coding some set of default icons (as on above picture - truck, bike, etc.) without ability to upload your custom icon. Icon will be a setting of each device (vehicle). This should be a good start from my point of view.

@bospre
Copy link
Author

@bospre bospre commented Nov 24, 2014

I agree.This should be a good start.

vitalidze added a commit that referenced this issue Dec 8, 2014
…sal. Also now it's possible to select them in device profile.
@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 8, 2014

First version with possibility to change icons is available here http://myultrashare.appspot.com/s/traccar-web/dev/latest/traccar-web.war

Right now it has following icons:

  • sedan sedan_white_53_20
  • universal universal_white_48_20
  • minivan minivan-white

History will still be printed as set of markers.

If it works, then I will add icons for following device types:

  • bicycle
  • bus
  • car truck
  • long truck
  • plane
  • ship
  • train
  • truck
  • cell phone
@vzoltan
Copy link

@vzoltan vzoltan commented Dec 9, 2014

Seems to be OK. (did not try when my car was on the go)

@bospre
Copy link
Author

@bospre bospre commented Dec 9, 2014

Hello,
looks very good.
But I didn't test with vehicle in movement either. (I have no doubt that this will work).
I am curious about the next icons.

vitalidze added a commit that referenced this issue Dec 9, 2014
vitalidze added a commit that referenced this issue Dec 9, 2014
vitalidze added a commit that referenced this issue Dec 9, 2014
@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 9, 2014

Thanks for testing. I have added all icons from my previous comment. Latest version with default english language is available as usual at http://myultrashare.appspot.com/s/traccar-web/dev/latest/traccar-web.war

Latest version with default hungarian is available at http://myultrashare.appspot.com/s/traccar-web/dev/latest/hu/traccar-web.war

@bospre
Copy link
Author

@bospre bospre commented Dec 10, 2014

Hello,
I just installed this new version.
Very nice.
A (very, very little) issue I found:
when you change the icon, it lasts about 10 seconds, until the icon
changes. At the first time this was a little bit confusing for me.
Can this change speed up?

I had not yet the possibility to test the new version, while the vehicle
is in motion.
When I had a look in the archive, I found the old icon.
That doesn't matter, but I will test next week with vehicle in motion.
I will reply again.

Am 09.12.2014 um 23:39 schrieb Vitaly Litvak:

Thanks for testing. I have added all icons from my previous comment.
Latest version with default english language is available as usual at
http://myultrashare.appspot.com/s/traccar-web/dev/latest/traccar-web.war

Latest version with default hungarian is available at
http://myultrashare.appspot.com/s/traccar-web/dev/latest/hu/traccar-web.war


Reply to this email directly or view it on GitHub
#41 (comment).

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 10, 2014

Thanks again for testing.

Actually right now this change is applied only on next latest position query, which happens by default every 15 seconds. I think I will make it updating right after saving device settings.

Regarding archive, I think it's better to draw it with markers rather than device icons just in terms of look and feel. Also it didn't require to create couple of additional icons per every device :) Anyway, this device icon is now drawn in popups, so once mouse is over an archive point it will show that icon.

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 13, 2014

In latest version icon on map will update right after saving device settings. Please check.

@bospre
Copy link
Author

@bospre bospre commented Dec 14, 2014

Thank you very much.
I wil check next week.
I found another issue, which I i will have to formulate, so you (maybe)
can fix it.
Boris
Am 13.12.2014 um 12:31 schrieb Vitaly Litvak:

In latest version icon on map will update right after saving device
settings. Please check.


Reply to this email directly or view it on GitHub
#41 (comment).

@bospre
Copy link
Author

@bospre bospre commented Dec 15, 2014

I just chequed and everything worked fine.
I had to clear the browser cache to get it working.
For the "other thing" I will create a new issue.

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 15, 2014

Sounds good. Thank you for testing. To close this issue I think I should put same icons to the mobile version, but I'm not sure.

@bospre
Copy link
Author

@bospre bospre commented Dec 15, 2014

I did not check the mobile version, but I think the mobile version should be equal.

I know now I am outrageous, but it when I was watching today the truck moving, I was thinking about, that it would be fine if the direction of the icon would be pointing towards the direction of the moving vehicle. But I think this ist too hard to realize.

@bospre
Copy link
Author

@bospre bospre commented Dec 15, 2014

I tried to check the mobile version, but it did not work.
But the desktop version didn't work either.
I don't know how to clear the browser-cache. Maybe that's the reason.

@vzoltan
Copy link

@vzoltan vzoltan commented Dec 15, 2014

try in incognito mode.

2014-12-15 11:54 GMT+01:00 bospre notifications@github.com:

I tried to check the mobile version, but it did not work.
But the desktop version didn't work either.
I don't know how to clear the browser-cache. Maybe that's the reason.

Reply to this email directly or view it on GitHub
#41 (comment)
.

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 15, 2014

Well, actually I haven't made any changes to the mobile version related to device icons, so it would be a big surprise if it will work :) I don't know how to clear cookies in mobile web browser, I guess you should refer to the OS documentation (iOS, android, etc.)

@bospre
Copy link
Author

@bospre bospre commented Dec 15, 2014

No, I meant the "website" did not work. I got a blank screen without loading the site correct.
I just found out, how to clear the cache, but it didn't work either.
I will have a closer look at it tonight.
I think, this an issue with my phone.

@bospre
Copy link
Author

@bospre bospre commented Dec 16, 2014

I tried to test with my mobile device, but I only got a dark screen. Clearing browser cache did not help.
I could see "+" and "-" and the last line "tiles c openstreetmap", but that's it. Login screen also works.
The "normal" version is working on the mobile device.

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 16, 2014

Sounds like it cannot load OpenStreetMap. This is most probably a connectivity issue. Does mobile version work for you when you open it from desktop?

@bospre
Copy link
Author

@bospre bospre commented Dec 16, 2014

Yes, from desktop PC it is working.
I will have to test with another device.

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 16, 2014

Thank you for testing. Also you can try switching map provider (i.e. to google or bing). You may consider creating new user for testing.

@bospre
Copy link
Author

@bospre bospre commented Dec 16, 2014

I just got a new device and tried to configure.
So I added the device and waited for the device to appear on the map. But it didn't appear. I started a network sniffer to check whether data is coming in. Data was coming in and answered by traccar webserver. So I checked the device ID and found out that there was a missing "0". I tried to change the ID but everytime I opened the setting-box there was the old value. So I tried to add a new device, but traccar ignored that. So I rebootet the whole system and tried again to add a new device, but no result. I can't add devices anymore . I deleted the last new device (that one with the missing Zero) and tried to add a new one again, but no chance.
Any idea what is going wrong here? (Tested with Firefox and IE)

@bospre
Copy link
Author

@bospre bospre commented Dec 16, 2014

Thank you, but how can I change th map provider in the mobile version?

Am 16.12.2014 um 11:50 schrieb Vitaly Litvak:

Thank you for testing. Also you can try switching map provider (i.e.
to google or bing). You may consider creating new user for testing.


Reply to this email directly or view it on GitHub
#41 (comment).

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 16, 2014

Regarding your issue with inability to add new/edit existing devices - please create new issue in this issue tracker and paste there wrapper.log file.

Thank you, but how can I change th map provider in the mobile version?

You can change map provider in Settings >> Preferences menu.

@bospre
Copy link
Author

@bospre bospre commented Dec 16, 2014

Sorry, but I just had a look at the mobile version again (the dark screen). But where are the settings? I only can see "+", "-" and ">". And with ">" I can change devices and logout. I can't find settings.

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 16, 2014

There are no settings in mobile version (for now). You should change them in 'desktop' version.

@bospre
Copy link
Author

@bospre bospre commented Dec 21, 2014

Hello,
I have one mor question: Where are the icons stored?
I had a look at the source code.
Is it true, that they are stored online and downloaded when they are used?
Sincerly

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 21, 2014

Default icons (except 'offline' icon) are stored on cloudflare CDN. All other icons are stored in traccar-web.war file. Yes, it's true that they are downloaded when they meant to be drawn on the map.

@bospre
Copy link
Author

@bospre bospre commented Dec 22, 2014

Hello,
wouldn't it be possible to store them in traccar-web.war?
(I would like, that, because in my experience it is better not to be dependend on cloud services and online services)

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 22, 2014

Of course, it is possible. However, I don't see any reason to do that. Right now these icons are hosted on CloudFlare CDN, which tends to be reliable. Moreover, not only icons, but external javascripts are also stored on CDNs. This approach helps traccar web server save resources from additional HTTP requests for icons and scripts and also helps browser cache to act more effectively (it should cache remote javascripts and images based on CDN URL, so if you switch sites that are using them it will simply take javascript from cache).

@vitalidze
Copy link
Owner

@vitalidze vitalidze commented Dec 28, 2014

Completed this feature, included in latest available and demo versions.

@vitalidze vitalidze closed this Dec 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.