After playing around with the MapTileSkin in the TilesFX project I thought it might make sense to add the ability to also visualize points of interest and a track...and so I've added those features :)
I've also added the ability to set the color of the current location marker and the color of the track (it's only one track supported at the moment).
To realize this behavior the Location class now also contains a color property.
For the colors I also decided to offer a defined set of colors which are the ones that you can find in Tile.TileColor
These colors will be used wherever possible within TilesFX to create a homogene look over all tiles.
To give you an idea how this new stuff is looking, here are some screenshots...
Map provider: Hydda
Map provider: OpenStreetMap HOT
Map provider: OpenStreetMap BlackWhite
Map provider: World Imagery
On the screenshot above you can see the current location icon (the bigger blue one), the start icon (green one at the end of the magenta track), the stop icon (the red one at the end of the magenta track) and some poi icons (the yellow, the red and the magenta one).
For the example above I've simply exported a track recorded by my Garmin watch to GPX format and imported the GPX file, converted the track points to a list of Locations and pass it to the Tile...done :)
If you are interested in the code I've used to convert the GPX file to my Location objects you can find a little gist that I've created on github which shows how it works. You simply have to provide a gpx file with the name track.gpx and put it besides the java file.
Here is the link to the gist.
Another feature that I've added is the ability to change the zoom level of the MapTileSkin via the current location. Therefor I've added a zoomLevel property to the Location class and if you change it e.g. by calling
the map tile will zoom out completely. The range of zoom levels is going from 0-17.
I hope this features might be useful to create for example a fitness dashboard etc.
At the moment I've not added a live tracking feature which would create a track on the fly every time the current location changes but this would be easy to add if it's needed.
As always feedback is more than welcome, so please don't hesitate to contact me and let me know about ideas/improvements/feature requests etc.
The above mentioned features are part of the current release of TilesFX which is 1.3.5 and which can be found here
The source code at Github
The binary at Bintray
The dependency at Maven Central (it's published but might take some time to show up)
That's it for today, so keep coding...