Showing posts with label maps. Show all posts
Showing posts with label maps. Show all posts

Sunday, December 21, 2025

Xmas & New Year's Maps


 

 

It's that time of year again in (Norther Hemisphere) winter when year's drawing to an end. Which means it's time for the traditional Christmas Maps blogpost.

 

Sometimes you hear claims about Santa Claus living at the North Pole (though in Rovaniemi, Finland, I bet they would disagree…). Turns out there's a North Pole near Fairbanks, Alaska as well:


  😄

OK, enough smalltalk… now on to what's happened since the last update (for the GNOME 49 release in September).

Sidebar Redesign

Our old design when it comes to showing information about places has revolved around the trusted old “popover” menu design which has served us pretty well. But it also had it's drawbacks.

For one it was never a good fit on small screen sizes (such as on phones). Therefore we had our own “home-made” place bar design with a separate dialog opening up when clicking the bar to reveal full details.

After some discussions and thinking about this, I decided to try out a new approach utilizing the MultiLayout component from libadwaita which gives the option to get an adaptive “auxillary view” widget which works as a sidebar on desktop, and a bottom sheet on mobile.

Now the routeplanner and place information views have both been consolidated to both reside in this new widget.

 Clicking the route button will now open the sidebar showing the routeplanner, or the bottom sheet depending on the mode.

And clicking a place icon on the map, or selecting a search result will open the place information, also showing in the sidebar, or bottom sheet. 

Route planner showing in sidebar in desktop mode

Routeplanner showing in bottom sheet in mobile/narrow mode

Routeplanner showing public transit itineraries in bottom sheet

Showing place information in sidebar in desktop mode

Showing place information in bottom sheet in mobile mode

 Redesigning Public Transit Itinerary Rendering

The displaying of public transit itineraries has also seen some overhaul.

First I did a bit of redesign of the rows representing journey legs, taking some queues from the Adwaita ExpanderRow style. Improving a bit compared to the old style which had been carried over from GTK 3.

List of journey legs, with the arrow indicating possibilty to expand to reveal more information

  

List of journey legs, with one leg “expanded” to show intermediate stops made by a train

 

Improving further on this Jalen Ng contributed a merge request implementing an improvement to the overview list utilizing Adwaita WrapBoxes to show more complete information the different steps of each presented itinerary option in the overview when searching for travel options with public transit.

Showing list of transit itineraries each consisting of multiple journey legs

 Jalen also started a redesign of rendering of itineraries (this merge request is still being worked on).

Redesign of transit itinerary display. Showing each leg as a “track segment“ using the line's color

 Hide Your Location

We also added the option to hide the marker showing your own location. One use for this e.g. if you want to make screenshots without revealing your exact location.

Menu to toggle showing your location marker

 And that's not All…

On top of this some other things. James Westman added support global-state expressions to libshumate's vector tile implementation. This should allow us to e.g. refactor the implementation of light and dark styles and language support in our map style without “recompiling”  the stylesheet at runtime.

James also fixed a bug sometimes causing the application to freeze when dragging the window between screens when a route is being displayed.

This fix has been backported to the 49.3 and 48.8 releases which has been tagged today as an early holiday gift.

And that's all for now, merry holidays, and  happy new year!

Saturday, September 7, 2024

Maps and GNOME 47


 
As it's now aproaching mid-September and the autumn release of GNOME, so is there also a new release of Maps approaching for GNOME 47.
 

Switch to Vector-based Map

The biggest change since last release is that we now use the vector-based map by default  and the old raster map has also been retired since we wanted to move forward with things like enabling, and relying on clickable POIs directly in the map view so we could the remove the old tedious “What's here?” context menu doing a reverse geocoding to get details about a place (which is also a bit hit-and-miss with regards to how close to where you point the actual result is).
 
Apart from this other benefits we get (and this has already been mentioned in earlier posts)  localized names (when tagged in OpenStreetMap) and finally a proper dark mode with our new GNOME map style.

Light (default) theme variant of the map in 47

Dark theme variant of the map in 47

Redesigned Search Bar

The “explore” button to open the search for nearby POIs by category menu has now been integrated into the entry to avoid a theme issue when using the linked button style where the rounded corners disappears on the “other side” when the results popover is showing.
 
Search bar with explore button

 This also looks a bit sleeker I think…

Improved Public Transit Routing

Public transit routing is now using the Transitous project (https://transitous.org) to provide transit routing for new regions. And as this is a crowd sourcing initiativ you can also help out by adding additional missing GTFS feeds to the project and it should automatically get supported by Maps.
For the time being, the regions we already supported by third-party APIs (such as Resrobot for Sweden, and OpenData.ch for Switzerland) will still use those providers to avoid possible regressions. It also gives us some leeway to improve MOTIS (the backend used by Transitous). The implementation in Maps also lacks e.g. support for specifying via locations.
 
Showing some travel itinerary options in Prague

Showing a sample of an itinerary from Lund, Sweden to Hamburg, Germany

Showing a sample of an itinerary in Denver, Colorado

 Updated Highway Shield Localizations

Thanks to the latest updates by the OSM Americana project (https://github.com/osm-americana/openstreetmap-americana) we now have some refinements in highway shield rendering.

French departmental routes (D-roads)

Turkish national D-roads

Some changes had to be made to our internal shield rendering library (we couldn't use the OSM Americana implementation directly, as we had to implement ours using Cairo rendering and so on) to support the new convenience shortcut for a “pill” shield shape, and also being able to define hard-coded route references “ref” directly in the shield definition rather than getting from the tile data.

Rochester Inner Loop in Rochester, New York, using a fixed “LOOP” reference label

 And on that note, a funny bug I discovered during some testing is that we currently always assume the “pointsUp” attribute in the shield definitions would always default to true when not explicitly set, while the OSM Americana code has different defaults depending on the following shape. So specifically for the “fishhead” shape it should actually be false when not set. I guess this is a bit odd to assume different values depending on following JSON elements, but…
 
Highway shields in New Zeeland

 It was a bit funny I discovered this bug when “browsing around“ in New Zeeland considering Northern Hemisphere-centric jokes about people “Down-under” walking upside-down 😀. But this actually also affects some highways in the US…
 
I guess this should be fixed before the 47.0 release.
 
And that's that for this time!

Saturday, May 11, 2024

May Maps

 

It's about time for the spring update of goings on in Maps!

There's been some changes going on since the release of 46.


Vector Map by Default

The vector map is now being used by default, and with it Maps supports dark mode (also the old raster tiles has been retired, though there still exists the hidden feature of running with a local tile directory. Which was never really intended for general use but more as a way to experiment with offline map support). The plan will be to eventually support proper offline map support with a way to download areas in a more user-friendly and organized way then to provide a raw path…).

Dark Improvements

Following the introduction of dark map support the default rendering of public transit routes and lines has been improved for the dark mode to give better contrast (something that trickier before when the map view was always light even when the rest of the UI, such as the sidebar itinerary was shown in dark mode).



More Transit Mode Icons

Jakub Steiner and Sam Hewitt has been working on designing icons for some additional modes of transit, such as trolley buses, taxi, and monorail.

Trolley bus routes

This screenshot was something I “mocked” by changing the icon for regular bus to temporarily use the newly designed trolley bus icon as we don't currently have any supported transit route provider in Maps currently that exposed trolley bus routes. I originally made this for an excursion with a vintage trolley bus I was going to attend, but that was cancelled in the last minute because of technical issues.

Showing a taxi station

And above we have the new taxi icon (this could be used both for showing on-demand communal taxi transit and for taxi stations on the map.

These icons have not yet been merged into Maps, as there's still some work going on finalizing their design. But I thought I still wanted to show them here…

Brand Logos

For a long time we have shown a title image from Wikidata or Wikipedia for places when available. Now we show a logo image (using the Wikidata reference for the brand of a venue) when available, and the place has no dedicated article).

Explaining Place Types

As sometimes it can be a bit hard to determine the exact type from the icons shown on the map. And especially for more generic types, such as shops where we have dedicated icons for some, and a generic icon. We now show the type also in the place bubble (using the translations extracted from the iD OSM editor).


Places with a name shows the icon and type description below the name, dimmed.


For unnamed places we show the icon and type instead of the name, in the same bold style as the name would normally use.

Additional Things

Another detail worth mentioning is that you can now clear the currently showing route from the context menu so you won't have to open the sidebar again and manually erase the filled in destinations.

 

Another improvement is that if you already enter a starting point with ”Route from Here“, or enter an address in the sidebar and then use the “Directions”  button from a place bubble, that starting point will now be used instead of the current location.

Besides this, also some old commented-out code was removed… but there's no screenshots of that, I'm afraid ☺

Tuesday, September 26, 2023

Maps and GNOME 45


 

The GNOME 45.0 release has just recently been published, and with it a new release of Maps. Accompaning the release is also a new stable version (1.1.0) of our libshumate map rendering library containing a lot of improvements to the client-side vector-based renderer.

Many of the new features has already been presented here, but a short re-cap:

The zoom control buttons has been moved (back) to using overlay buttons on top of the map view. A rotation button has also been added, appearing when the map is rotated away from the regular “north is up” which can then be clicked to reset the rotation.



As well as a browse mode for the search popover allowing to look for nearby points-of-interest by category.


The other new big thing is the addition of the experimental vector-based map layer (leveraging the enhanced vector support in libshumate 1.1.0). This is available in run-time when the build of libshumate used is compiled with vector support enabled (it's currently opt-in at build-time, but maybe we should enable it by default for 1.2.0, making it opt-out instead? There could still be use-cases where building a slimmed-down version with only raster support could be useful). The Flatpak for Maps 45.0 on Flathub has a bundled libshumate with the vector renderer enabled. There still remains some work to be done that wasn't ready for 45, so for example it's not yet possible to directly click on labels and markers on the map. As this will require further refactoring of the internals e.g. how store information about places (for caching, and also for storing bookmarked places).

The experimental layer currently uses the OSM Libre stylesheet, but eventually the plan is to switch our own GNOME-specific style using color hues from the GNOME icon palette.

New stuff looking forward to in upcoming releases:

James Westman has been busy not only with improving the vector renderer in libshumate, but he has also made progress on the new map style.




 The style now finally includes initial support for rail lines!

The style can be tested using the web renderer: https://maps.jwestman.net/

It's also possible to clone the git repo for the style and run it using a built-in Python-based launcher (this uses actual libshumate rendering, typically would require installing development packages to your host system): https://gitlab.gnome.org/jwestman/map-style

Another cool thing (that can also be seen in the web screenshots above) is localized highway shield rendering building on the OSM Americana project: https://wiki.openstreetmap.org/wiki/OpenStreetMap_Americana

 

An experimental branch implementing shield rendering in Maps is also work-in-progress.



This currently uses the OSM Liberty style (the same as the current experimental map layer in Maps 45).

So it's looking pretty exciting for for 46 😊

Until next time, happy mapping!

Saturday, July 1, 2023

Summer Maps

 It's about time for the yearly (Northern Hemisphere) Summer Maps blog post. 😎



Since the release of 44.0 in March, aside from some fixes (like adding support for authentication HTTP headers in OpenTripPlanner plugin, as now needed by the Finnish Digitransit service) there has also been some changes on the surface in Maps.

First, Jakub Steiner has contributed with a refresh of icons used for transportation modes, and the various mode of public transit.

Here we can see the icons for transportation modes (walking, biking, car, and public transit, using a „train icon“) using the new GNOME icon style

In this capture we can see the new icons for metro (underground, subway service)


Above there is some samples from Portland, showing trams and gondolas.


Another new feature is the „Explore nearby points-of-interest“ browser mode of the main search entry, allowing the select preset categories grouped by main and sub categories. Clicking on a subcategory then proceeds with a search given the selected type of place centered around the center of the current map view sorted by, and showing the distance to the place („as the crow flies distance“):

Clicking the down-arrow button, or using the new CTRL+SHIFT+F shortcut shows the main categories

After selecting a sub category

Showing points-of-interest results with distances

Results nearby (less than 100 m, or 300 feet when using Imperial measures) are shown with a „less than“ indication as these can be somewhat imprecise, especially for things with a “two-dimensional extent“ such as larger buildings, or areas

 

This feature was something I had in mind for a while, and there has been an old issue about this floating around since the Bugzilla days (before the migration to GitLab, it was issue #3 after the migration…).

I remember envisioning the outlines of this during a walk one afternoon/evening early in winter of 2021 during the mandated „working from home“ days when we had step contest at work. But I had put the idea off before in anticipation of the GTK 4 port as I din't want introduce too much new UI needing porting before that). But now that that has been finished it was time…

 Behind the scenes this is using the Overpass API to search the OpenStreetMap database based on tags and centered around a specific coordinate.

And by the way, the set of categories is defined in JSON-like object structure in the src/potCategories.js module, so this can be altered relatively easy (and add Overpass query parameter „fragments“.


The next thing, the routing sidebar has had some issues when using a small form-factor device (e.g. phones), now there is WIP in an MR to migrate the sidebar to use an OverlaySplitView from libadwaita.


This allows swiping in from the edge to bring up the routing sidebar and „swipe away“ the sidebar to close it on touch screens.

It also „collapses“ the view so the sidebar is overlayed on the map view rather than „pushing it aside“ on narrower screens:


This is still not finally merged to main, but hopefully this should make it in for 45.0.


Another thing is that since migration to libshumate it is possible to rotate the map view using touch gestures. And as we didn't have a way to reset the rotation (beside restarting the application) to mitigate that I have added a compass button showing when the view rotated away from normal „north is up”.

 

Also the zoom buttons have been moved back to be overlay buttons as they where back in the day. They where changed to headerbar button back in 2017 as a work-around for GTK widgets not being able to be overlayed on top of Clutter surfaces on Wayland. But this is no longer an issue as we don't use Clutter nowadays.

This overlay button design might be subject for a redesign later on. Possible moving them down to the bottom end (right in LTR) corner, similar to the zoom controls of the new Loupe image viewer app. The license banner would then be displayed on startup as toast maybe, or as popover when clicking an info button. Or something like that.

And last, but not least we had a contribution from Szymon Kłos who implemented support loading tracks recorded by Garmin sport watches as shape layers. Thanks Szymon!

I will also attend GUADEC in Riga later in July, so those who go there, maybe see you there!

And I think that's about it for this time!