Wednesday, 30 September 2015

Do you want to contribute to Maps?

Right now we have quite a number of tasks in our Bugzilla that are suitable for someone that want to get started developing for Maps or GNOME in general.

I am going to list some of them here and maybe it will pique someones interest. However finding a first task to work on is not all that one need to do in order to start developing for GNOME. You also need to be able to build and run the latest developer version of the GNOME module you want to develop for. In order to get there I will defer to the excellent Newcomers guide.

On to the Maps entry tasks!

Remember last location and use it at start up

This task is about saving the latitude and longitude of the view you are currently viewing so that Maps can go there on start-up. Instead of starting with a view of the world every time.

So in order to solve this you will interact a bit with the GSettings framework and a bit with the ChamplainView that contains our map.

Use stars instead of hearts for favorite places

We currently use hearts for favorite places on our Map bubbles. The rest of GNOME use stars. We should use stars as well. So here you will interact a bit with CSS and with UI files.

Implement new mockups for map Bubbles

We want to fit more information in our map bubbles. New mockups have been provided in the bugzilla for this task. To solve this you need to, among other things, interact a bit with GtkBuilder ui-files.

Support roundabouts in GraphHopper route results

GraphHopper now supports roundbouts. But we do not show that in our route planner UI. For this task we need to use the information from GraphHopper in the Maps ui.

These were a few of our tasks, there are More! We want your help and need it to make Maps 3.20 the best release yet!


Saturday, 12 September 2015

Using offline (local) tiles with GNOME Maps

I managed to get a freeze exception to include a new feature in Maps for 3.18. It is now possible to use local, offline, tiles by using the --local command line option.
What you need are image map tiles, organized in a standard way in a directory. Then you can point Maps towards that directory and have local tiles usable offline.

For instance, I downloaded a bounding box of London. In the zoom-levels of 11, 12, 13, 14 and 15. The tiles are organized as Z/X/Y.png. Where Z is zoom-level, X and Y are the tile numbers. London at those zoom-levels will be 2750 tiles and about 60M.

I used a perl script found while googling. Please be advised to follow the tile servers usage policy before attempting bulk downloading of tiles.

$ tree london/
├── 11
│   ├── 1022
│   │   ├── 679.png
│   │   ├── 680.png
│   │   ├── 681.png
│   │   └── 682.png
│   ├── 1023
│   │   ├── 679.png
│   │   ├── 680.png
│   │   ├── 681.png
│   │   └── 682.png
│   └── 1024
│       ├── 679.png
│       ├── 680.png
│       ├── 681.png
│       └── 682.png
├── 12
│   ├── 2044
│   │   ├── 1359.png
│   │   ├── 1360.png

Using this I can do:
$ jhbuild run gnome-maps --local ~/london

So this is kind of an hidden feature. So that we can test using offline tiles before we find a way of getting downloading into Maps. One kind of major issue right now is where do we get the tiles? Bulk downloading tiles from OpenStreetMaps is not very nice. OSM is a non-profit org. run by volunteers on donations. We do not want to leach on bandwidth. So we need a way around this. Maybe host our own?

Please also consider that when and if you want to download tiles to try this Maps feature. See the tile usage policy about bulk downloading. And try to follow it!

Please enjoy!