Skip to content

Migrate from Mapbox to OpenLayers #159

Description

@easbar

Still not decided whether or not we should do this, but if yes we should probably do it soon.

Some pros and cons compared to Mapbox (just considering the issues we ran into so far)

Pro:

Con:

  • slower vector tile rendering (important for /spt, not so much for /mvt)
  • if we consider vector tiles to be too slow with OL we cannot take advantage of some of the corresponding benefits, like custom map styling. Still we could use the Mapbox GL JS integration of OL.
  • cannot pitch/tilt the map -> try PerspectiveMap extension

I started to explore this migration here: https://github.com/graphhopper/graphhopper-maps/tree/ol_exp
The live instance is running here: http://gh-maps-react.s3-website.eu-central-1.amazonaws.com/ol_exp/
See also the discussion here: #132

This is the current list of todos for the ol_exp branch:

  • fix remaining svg marker issues, see commit message: f2213e2, but at least the cursor appearance is now fixed
  • make markers draggable
  • add context menu (including the long touch handler)
  • put back path details layer
  • add map attributions
  • allow click selection of the paths
  • restrict map zoom/pan so we cannot pan around the globe
  • put back view store test
  • use same mouse cursors for map as in master
  • bug/issue: when refreshing map with a route the map flickers and sometimes even ends up being zoomed out all the way to world view -> this is caused by a bug in master (Map zooms to both the info bbox and the route bbox if url contains points #162)
  • test (also on mobile)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions