All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 190 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8
Author Message
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Mon Apr 10, 2017 12:04 pm 
Offline
FlightAware Member
w7psk - FlightAware user avatar

Joined: Tue Jan 16, 2007 2:00 pm
Posts: 588
Location: KPAE
Anything new. Could use the whole file again. When I upgraded to 3.5 seemed to have overwrote it. The stock one has some really Goofy stuff going on.


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Mon Apr 10, 2017 6:34 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
w7psk wrote:
Anything new. Could use the whole file again. When I upgraded to 3.5 seemed to have overwrote it. The stock one has some really Goofy stuff going on.


I have just started looking into this on 3.5 today, the SVG graphic format has changed as has the SVG drawing code. I need to update everything anyway as DropBox kindly switched off my public folder so all the previews in this thread are dead.

So far I have got my extra database fields up and going again but no custom graphics.

Watch this space...

Quick update: looks like the actual full SVG code has been dropped into PlaneObjects now if that is the case this should be easy to adapt to

Update #2: Got a graphic working, however, there appear to be two paths for every graphic now, one for fill and one for outline, having some challenges getting something with a colour fill and a black outline though... I can get a coloured plane with no fill or just a black plane.


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue Apr 11, 2017 11:00 am 
Offline
FlightAware Member
w7psk - FlightAware user avatar

Joined: Tue Jan 16, 2007 2:00 pm
Posts: 588
Location: KPAE
FlyingPeteNZ wrote:

Update #2: Got a graphic working, however, there appear to be two paths for every graphic now, one for fill and one for outline, having some challenges getting something with a colour fill and a black outline though... I can get a coloured plane with no fill or just a black plane.


Yes they give you the plane altitude in color now. So I could see why the new variation.


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue Apr 11, 2017 2:44 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
This is how things look if I use the old graphic with little in the way of modification, I can get them working but it's a major rework of all graphics.
Image
Image

Obviously scaling is an issue too.


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue Apr 11, 2017 7:47 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
I have fudged an outline onto the new planes, the problem it is always a predefined width and colour, irrespective if selected or MLAT. I am OK with that for my purposes but it doesn't really seem like a good solution.

I have also got a way of scaling again too.

It seems the approach in the 3.5 with the graphics allows for much better quality, however, it would mean a lot of work adapting the old custom graphics to work.

If you want a play, chuck this in the markers.js and reference some plane types to "a320"

'a320': {
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="32px" height="32px" add_stroke_selected><defs><style>.cls-1{fill:aircraft_color_fill;}</style></defs><title>a320_live</title><g id="Layer_2" data-name="Layer 2"><g id="A320"><path class="cls-1" d="m 32,1.8 0.4,0.1 0.4,0.4 0.7,1.1 0.7,1.4 0.4,1.3 0.3,1.4 0.1,1.2 0,11.6 0.3,0.8 0.3,0.3 3.7,1.9 -0.2,-1.2 0,-1.5 0.1,-1.2 0.2,-0.4 2.4,0 0.2,0.4 0.1,1.2 0,1.5 -0.3,2 -0.2,0 0,0.4 15.7,8.1 0.3,0.2 0.2,0.2 0.1,0.3 0,2.5 -0.2,0 0,-0.8 -7.5,-2.2 -0.1,0.5 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.1,-0.7 -4.8,-1.4 -0.1,0.5 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.1,-0.7 -2.3,-0.7 -1.1,0 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.8,0 -0.1,0.7 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.1,-0.7 -4,0 0,11.6 -0.1,2.9 -0.3,2 -0.3,1.7 -0.4,1.7 0.1,0.4 0.4,0.4 6.8,4.5 0.1,0.1 0.1,0.3 0,1.6 -8.2,-1.9 -0.3,1.3 -0.3,0.9 -0.2,0.7 0,0.3 -0.8,0 0,-0.3 -0.2,-0.7 -0.3,-0.9 -0.3,-1.3 -8.2,1.9 0,-1.6 0.1,-0.3 0.1,-0.1 6.8,-4.5 0.4,-0.4 0.1,-0.4 -0.4,-1.7 -0.3,-1.7 -0.3,-2 -0.1,-2.9 0,-11.6 -4,0 -0.1,0.7 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.1,-0.7 -0.8,0 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -1.1,0 -2.3,0.7 -0.1,0.7 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.1,-0.5 -4.8,1.4 -0.1,0.7 -0.1,0.4 -0.1,0.2 -0.1,-0.2 -0.1,-0.4 -0.1,-0.5 -7.5,2.2 0,0.8 -0.2,0 0,-2.5 0.1,-0.3 0.2,-0.2 0.3,-0.2 15.7,-8.1 0,-0.4 -0.2,0 -0.3,-2 0,-1.5 0.1,-1.2 0.2,-0.4 2.4,0 0.2,0.4 0.1,1.2 0,1.5 -0.2,1.2 3.7,-1.9 0.3,-0.3 0.3,-0.8 0,-11.6 0.1,-1.2 0.3,-1.4 0.4,-1.3 0.7,-1.4 0.7,-1.1 0.4,-0.4 z" stroke="black" stroke-width="0.5"/></g></g></svg>',
size: [32,32]


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Wed Apr 12, 2017 8:09 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
If you want to live on the edge and try the custom graphics in 3.5.0, drop this file into /usr/share/dump1090-fa/html replacing the existing one (backup existing one first!)

Got most of Boeing and Airbus in there plus a splash of other stuff, all have black outlines though.

http://iaucklan63.net/markers.js


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Sun Apr 16, 2017 10:45 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
OK, I have "decoded" the new graphics. In a nutshell, it's currently in my too hard basket to update mine to this new format.

Basically, there are now two paths, one for the fill and one for the outline. This allows the outline to scale with the graphic as there is officially no outline in use from an SVG perspective.

I will continue to update my old graphics into the new wrapper as I prefer them over old.

Wouldn't mind some input on other ways to dynamically update the outline colour without using the two paths.

Not sure of the reasoning behind this change as it seems to me to be more work.

Here is a sample of a fill path
Image

Here is a sample of an outline path
Image


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Mon Apr 17, 2017 2:56 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
Slept on it last night, got up and fiddled with the code a bit, got the different coloured outlines working without recoding the graphics, the only thing not working now is the colour change when selected...

Here is link again to markers.js (Build 8)
http://iaucklan63.net/markers.js
I have updated it to include these changes

MLAT:
Image

ADS-B:
Image


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue May 16, 2017 1:18 am 
Offline
FlightAware Member
w7psk - FlightAware user avatar

Joined: Tue Jan 16, 2007 2:00 pm
Posts: 588
Location: KPAE
Newest iteration looks good. Works great for me :)


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue May 16, 2017 9:58 am 
Offline
FlightAware Member
w7psk - FlightAware user avatar

Joined: Tue Jan 16, 2007 2:00 pm
Posts: 588
Location: KPAE
Found couple of errors, Im going to edit the file and see if I can find it.

Have a GLF4 and a C25C over head and the Icon is the DASH8 ...

EDIT: Seems several A/C exhibit this behavior but I cannot find the commonality.
looked in markers.js but cannot find an error.


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue May 16, 2017 2:22 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
w7psk wrote:
Found couple of errors, Im going to edit the file and see if I can find it.

Have a GLF4 and a C25C over head and the Icon is the DASH8 ...

EDIT: Seems several A/C exhibit this behavior but I cannot find the commonality.
looked in markers.js but cannot find an error.


Yeah, I noticed something was out last night when I saw a DASH8 way out over the Tasman Sea which is quite rare and unusual, turned out it was a GLF4, will look into code and update...


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue May 16, 2017 3:37 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
Found the bug! The SVG code for the GLEX was actually DASH-8 code, fixed it and updated to my share.

Tested it too, Pacific Jets kindly fired up their C52C just for me :)

It's the one in the top right here just under the SH20B icon:
Image


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue May 16, 2017 5:20 pm 
Offline
FlightAware Member
w7psk - FlightAware user avatar

Joined: Tue Jan 16, 2007 2:00 pm
Posts: 588
Location: KPAE
FlyingPeteNZ wrote:
Found the bug! The SVG code for the GLEX was actually DASH-8 code, fixed it and updated to my share.

Tested it too, Pacific Jets kindly fired up their C52C just for me :)

It's the one in the top right here just under the SH20B icon:


Cool beans, if you post the GLEX code I can just cut and paste it into my markers.js.


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Tue May 16, 2017 6:02 pm 
Offline
FlightAware Member
FlyingPeteNZ - FlightAware user avatar

Joined: Thu Aug 04, 2016 10:47 pm
Posts: 156
Location: Auckland, New Zealand
w7psk wrote:
FlyingPeteNZ wrote:
Found the bug! The SVG code for the GLEX was actually DASH-8 code, fixed it and updated to my share.

Tested it too, Pacific Jets kindly fired up their C52C just for me :)

It's the one in the top right here just under the SH20B icon:


Cool beans, if you post the GLEX code I can just cut and paste it into my markers.js.


Here you go:
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="35px" height="35px" add_stroke_selected><defs><style>.cls-1{fill:aircraft_color_fill;stroke:aircraft_color_stroke;stroke-width:0.5;}</style></defs><title>glex_live</title><g id="Layer_2" data-name="Layer 2"><g id="GlobalExpress"><path class="cls-1" d="m 32,2.7 0.3,0.1 0.7,0.8 0.5,0.8 0.9,2.3 0.3,2.3 0,12.6 24.5,18.9 1,3 0,1.4 -0.8,-1.7 -0.1,0.3 -0.1,0 -0.1,-0.2 0,-0.4 -6.7,-3.3 0,0.2 -0.1,0.4 -0.1,0.1 -0.1,-0.1 -0.1,-0.4 0,-0.4 -5.5,-2.8 0,0.2 -0.1,0.4 -0.1,0.1 -0.1,-0.1 -0.1,-0.4 0,-0.4 -5.1,-1.5 0,0.2 -0.1,0.4 -0.1,0.1 -0.1,-0.1 -0.1,-0.4 0,-0.3 -5.9,-0.5 0,1.1 -0.2,1.4 -0.3,1.3 0.5,0 0.1,-0.3 0.2,-0.2 2.8,0 0.2,0.2 0.2,0.4 0.2,0.7 0.1,1.1 0,1.8 -0.2,1.6 -0.3,1.6 -0.3,1.4 -0.4,1.5 -2.1,0 -0.1,-0.2 -1.4,0.7 -0.3,1.3 -0.4,1.1 7.8,7 0.4,0.5 0.2,0.5 0,2.6 -9,-4.7 -0.1,0.6 -0.1,0.4 -0.1,0.2 -0.1,0.1 -0.1,-0.1 -0.1,-0.2 -0.1,-0.4 -0.1,-0.6 -9,4.7 0,-2.6 0.2,-0.5 0.4,-0.5 7.8,-7 -0.4,-1.1 -0.3,-1.3 -1.4,-0.7 -0.1,0.2 -2.1,0 -0.4,-1.5 -0.3,-1.4 -0.3,-1.6 -0.2,-1.6 0,-1.8 0.1,-1.1 0.2,-0.7 0.2,-0.4 0.2,-0.2 2.8,0 0.2,0.2 0.1,0.3 0.5,0 -0.3,-1.3 -0.2,-1.4 0,-1.1 -5.9,0.5 0,0.3 -0.1,0.4 -0.1,0.1 -0.1,-0.1 -0.1,-0.4 0,-0.2 -5.1,1.5 0,0.4 -0.1,0.4 -0.1,0.1 -0.1,-0.1 -0.1,-0.4 0,-0.2 -5.5,2.8 0,0.4 -0.1,0.4 -0.1,0.1 -0.1,-0.1 -0.1,-0.4 0,-0.2 -6.7,3.3 0,0.4 -0.1,0.2 -0.1,0 -0.1,-0.3 -0.8,1.7 0,-1.4 1,-3 24.5,-18.9 0,-12.6 0.3,-2.3 0.9,-2.3 0.5,-0.8 0.7,-0.8 z"/></g></g></svg>',


Top
 Profile  
 
 Post subject: Re: Some custom SVG plane icons...
PostPosted: Wed May 17, 2017 1:16 am 
Offline
FlightAware Member
w7psk - FlightAware user avatar

Joined: Tue Jan 16, 2007 2:00 pm
Posts: 588
Location: KPAE
That works peach


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 190 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Akissack, davewill2010, Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: