Thursday, September 7, 2017

Approaching 3.26

So, we're on final stretch towards the GNOME 3.26 release next week, just released the last beta of Maps (3.25.92) earlier in the week. This cycle hasn't seen that any real ground-breaking user-visible changes. But various smaller bugfixes. Nevertheless there's been a few nice improvements on the surface (as seen in earlier blogposts).

A couple of handy keyboard shortcuts:

To switch between the regular map view and aerial view, ctrl+1 and ctrl+2 can be used (instead of having to use the layer menu in the title bar). And to ctrl+o to open a layer file (such as a GPX recorded GPS track).

We have also added some additional details shown in map bubbles, and those are also available for editing objects on OpenStreetMap

Now we have availabilty of toilets as well as relegious affinity (for things like places of worship) available. Also for the edit view, we now show and allow editing of editor notes (these are meant as hints for other contributors on OpenStreetMap).

One feature I talked about earlier, but that hasn't landed yet (and thus will have to wait until 3.28 next spring) is the showing of thumbnail images obtained from Wikipedia in the map bubbles, as we haven't settled the UI and tweaked suitable sizes and such yet.

Another issue I fixed is how we handle entering search text when starting typing, previously we would always focus the main search entry by default when starting the application. This had the downside of always showing the on-screen keyboard on start-up on tablets (when no keyboard is available). Now the search entry is instead automatically focused when typing (and no other text entry is active). This also means you can always start a search by start typing (unless a dialog such as the edit dialog is up, of course). This is also more in-line with how other GNOME apps does it.

Unfortunatly, we still haven't found a solution for hosting an instance of OpenTripPlanner for public transit routing, so when using that feature you'll still need to either run your own server, or point to a third-party one (by using the OTP_BASE_URL environment variable).

Monday, August 7, 2017

Maps on the go

Just when going on vacation I finally decided to replace my aging old E-Machines netbook from 2010 that has been a faithful companion when wanting to travel light but still having a more "full-size" OS. This type of machines have kind of been out of fashion since tables (specifically the iPad) gained popularity. But nowadays there are also some interesting 2-in-1 devices being both a light laptop and tablet if you like. Also it seemed intriguing to finally play with a touch-oriented device in the GNOME / FreeDesktop / GNU/Linux environment.

So, finally I decided to try out this little thing:

So, this device is a Lamina T-1016B.NORD, it's a fairly cheap Cherrytrail-based Intel Atom device. The ironic thing is the image on the box features Windows Maps :-). Also the advertisement read something like “Discover the power of Windows Maps”. But of course I wanted to upgrade the OS. I went with the 4 GB version of Debian's latest stable release, because I didn't want to get stuck trying to get a mininal net installation ISO of latest testing going (with trying to figure out which additional firmware would be needed for WiFi, and I was pretty sure something like that would be nessesary). Installation was pretty pain-less except for one thing: Everything on the screen was rotated 90 degrees counter-clockwise (more on this later). After having read reviews of people installing Linux on similar devices and claiming external USB keyboards and powered USB hubs are essential, this was refreshingly simple, after all.

After installing the firmware for WiFi and sound, WiFi works and sound (but the headphone jack is not recognized correctly). But the most annoying issue for now is the lack of power management support. The battery is not recognized and the screen is stuck on full brighness. Despite this I can still get something like 5 hours of light usage, which is probably still quite OK given the circumstances. Also suspend is not supported (supposedly Cherrytrail doesn't have traditional suspend, but something called “connected standby”, so this limits the usefulness as an “instance on” device. But on the plus side, the flash drive is actually quite quick to boot from. After that, having support for the built-in GPS device would be really nice. Not really sure what kind of device that is, it doesn't seem to show up in either lsusb nor lspci.

For the rotated weirdness it turns out the display is actually natively portrait-oriented, which is evident when the Linux console shows (however the boot logo is rendering suited for landscape mode). The rotation sensor however is mounted in way that indicates “normal” when the device is in landcape mode. Thus out-of-the-box, the desktop is tilted sideways. And rotating the device activates the sensor, but of course still gives an indication that is “off” compared to what the display “expects”.

So, it was time to bring out a trusty old linear algebra book and brush off some matrix skills. Scribbling down the some transformations from what the sensor reports and what would correspond to what the display would expect for it to be right (thanks Bastien Nocera for giving me pointers) I could then translate this into a transformation matrix:

And eventually cooking up a patch for the udev hwdb (within systemd).

Related to the title of this post, though, this is problably what you wanted to see, though

Testing out how Maps works :-)
One slighly annoying thing that showed up is the fact that launching Maps without the keyboard attached will always bring up the on-screen keyboard. The reason for this is that we always explicitly focus the search entry widget to achive being able to just start typing to enter things to search for (which is handy with a keyboard). We should probably re-write this to be more like how some other GNOME apps are wired, where the keypresses are handled by the main window and the search machinery is activated when appropriate. There's some other known issues, such as the lack of pinch-to-zoom support and long-press to get the context menu. I started tagging these bugs with a “touch” keyword. So, hopefully I will get some time to tackle these in the not-to-far distant future. Some like the search issue could probably go in before 3.26 even though we're technically in UI freeze now. Yes, I just released 3.25.90 by the way. While other things like pinch-to-zoom would require support in libchamplain (possibly), and might depend on what we want to do going forward with how we render the map data.

All-in-all it's been a fun little device to play with so far :-)

Wednesday, June 21, 2017

Midsommer Maps

So we just released the third development release of Maps in the 3.25 series (leading up to 3.26.0 in September).

Some new noteworthy new features and fixes made it in. We gained a couple of new keyboard shortcuts

Control and 1 and 2 to switch the view between street (the “ordinary” map) and aerial view (the shortcuts where inspired by Nautilus) and Control+o to open shape layers (we had a bug report suggesting adding this feature, which indicates it might not have been discoverable enough). Using the standard “open a file” shortcut makes sense, since that might be something you may try without thinking too much about it. And ofcourse it will also show up in the help overlay (as pictured above).

Furthermore, we now remember the mode of transport used for routing between runs, so it no longer reverts to car every time you start Maps (and it also uses the currently set mode when routing to a place from a marker bubble in the view).

Another annoying thing we've fixed is that we no longer reset the list of found itineraries when doing a transit route search and you click on “Load later alternatives” (or earlier) and no more results where found, instead we now show a notification and keep the previous results:

as can be seen in this screenshot showing results for a bus route which only runs on limited days.

We now also, thanks to work done by Robery Ancell, show religion information (for places of worship and book store for example) and information on the availability of toylets (when data is provided in OSM ofcourse). These can also be edited for POIs in OSM.

And it didn't stop there, after the release another feature implemented by Elias Entrup and Neha Yadav has landed. And that's that the search popover no longer just disappears when no results where found, but rather show an indication that nothing was found:

I also managed to do a little mess-up with the “remember the mode of transport” feature, so it was a little broken when currenly using transit and clicking the route button in a place “bubble”. So that has been fixed since in master.

And there was certainly some more things I have already forgotten :-)

Wednesday, May 10, 2017

Maps news

It´s been a while since the last post here, so I thought I should share some now.

3.24.2 was just released and right before the release a nasty crash-on-exit bug appeared. Actually, the bug has been in there ever since Maps gained the ability to show your contact´s addresses from GNOME Calendar/Evolution, but it was brought into daylight by the new version of GJS (our JavaScript engine, based on SpiderMonkey). The problem actually is that in the dispose vfunc of the ContactStore object (this is in our glue C code) we had forgotten to NULL out some pointer memebers when freeing the objects (with g_list_free and g_free) and dispose can be called multiple times and we probably got away before because GJS leaked these objects in the earlier versions. We got this bug report from Ubuntu by the way, in 17.04 the new version of GJS is already used. Thanks to Emmanuele Bassi for spotting this use-after-free bug, this is now fixed in the new version (and in master of course).

Other than this, things have been a bit calm lately. But I have some goodies as candidates for 3.26 functionallity.

The first I thought I should show involves using the Wikipedia tag data from OpenStreetMap and Wikimedia´s thumbnailing API to obtain thumbnails for the map bubbles shown for search results:

Another thing I have sometimes missed is keyboard shortcuts to switch between street and aerial view, so a couple of new shortcuts for that (I choose alt+1 and alt+2 to match the ones used in Nautilus to switch between icon and list mode):

And finally another idea we had before was being able to edit localized name variants in OpenStreetMap (this helps improving searchability for users in cases where the name of a place might differ a bit in different languages).

So, I modified the edit dialog a bit, so that instead of the delete button for the name field, there is now a “more stuff” button:

Clicking on it shows a page for editing variants of the name:

Here we have provisioning for giving an alternative name (such as a locally-known-as inofficial name for a place), older/historic names of places, and the name in the user´s language (I also added a static English name field, since the English name variant is often defacto used in OpenStreetMap as Romanized version in cases where the native name of a place is writtin in a non-latin script). This feature might need some designer feedback.

Another feature that might be cool that I have been thinking up a bit on is showing upcoming departures for public transit stops (and maybe nearby stops when using your current position). There is not yet any concrete implementation of anything here and this would also need some designer love.

And also, when speaking of transit, we´re still looking for options for hosting an OpenTripPlanner server instance (you still have to run your own and use either the service file override or using the debug environment variable), so if you happen to have some ideas here, it´s always welcome!

Tuesday, March 14, 2017

Approaching 3.24

So, we have just entered code freeze approaching the GNOME 3.24 release, which is scheduled for next week.
In Maps, I just released the final beta (3.23.92) tarball yesterday, but since I made a git mistake (shit happens), I had to push an additional tag, so if you want to check out the release using the tag (and not using a tarball), go for “v3.23.92-real”.
Right after the release I got some reports of Maps not working when running sandboxed from a Flatpak package. It seems that the GOA (GNOME Online Accounts) service is not reachable via dbus from inside the sandbox, and while this is something that should be fixed (for applications that needs this privilege when running sandboxed) we still shouldn't crash. Actually I think this might also affect people wanting to run Maps in a more minimalistic non-GNOME environment. So I have proposed a patch that should fix this issue, and hopefully we can get time to review this and get freeze exception for this as a last-minute fix.

Another thing I thought I should point out after reading the article on Phoronix after my last blog post about landing the transit routing feature, and I was perhaps a bit unclear on this, is that using the debug environment variable to specify the URL for an OpenTripPlanner server requires that you have an instance to point it to, such as running your own server or using a third-party server. We will not have the infrastructure in place for a GNOME-hosted server in time for the 3.24 release.

Looking ahead towards 3.26, I have some ideas both as proof-of-concept implementation and some thoughts, but more on that later!

Wednesday, February 15, 2017

Transit routing has landed!

So, at FOSDEM a bit over a week ago, me, Jonas Danielsson, Mattias Bengtsson, and Andreas Nilsson talked about plans for landing the transit routing feature and we started doing some patch reviewing over some beers on Saturday evening.

Thanks to a lot of awesome reviewing work done by Jonas, this work has finally landed in master!

As always when merging such a long-living branch where I have been dwelling for about a year or so almost feels like saying farewell to an old friend.

Though, until we have sorted out some infrastructure for running OpenTripPlanner, you would have to use the debug environment variable OTP_BASE_URL (or modify the service file) as I have described in earlier blog posts.

Another feature that I intend to squeeze in before we release 3.24 is the ability to reverse routes. This is something that came up during Andreas' user interviews, one user had a use-case of going into town to meet up with friends and finding a suitable route home later in the evening. I realized our current UI is a bit awkward for this (even though you can drag and drop the entered places/addresses).

So with this new feature you get a handy button to reverse what you just searched for:

Searching for a route.

After clicking the reverse button (the up/down arrows)

Looking at one of trips

So, until next time, map along! :-)

Wednesday, February 1, 2017

Next stop: Brussels

On Friday I'm leaving for Brussels and FOSDEM!

Looking forward to be back again after missing out on last year´s incarnation and meeting familiar faces in real life once again, listening to interesting talks, both those relevant to work-related activities and personal interests, as well as general techie stuff, as I usually tend to end up at some “unexpected“ talk. Especially in the afternoon when getting a bit of fatigue and just staying around after the previous talk (which I had planned to attend) :-)

When it comes to Maps, I also have some good news. Just in time for FOSDEM I have managed to set up a temporary OpenTripPlanner server instance for the event so that people can test things out with the transit-routing branch.

The server has the base URL http://tricholoma dot update dot uu dot se:8080/otp

(replace dot with a . obviously, as I wanted to at least make it somewhat less likely for automated bots to generate extra load)

Beware that this server is not behind an HTTPS proxy (which should be the case for a real server, so that the user´s activity isn´t leaked to a potential third party).

As before, use the OTP_BASE_URL environment variable (or use a modified service file as described in an earlier post).
The server is currently loaded with transit data for the whole of Belgium.

A little screenshot showing a plausible trip from ULB to Grand Place after on Saturday afternoon.

And last, but not least I would like to thank my employer PrimeKey Solutions AB for sponsoring my trip and for kindly letting me run the demo server on their hardware.