Giter VIP home page Giter VIP logo

benmaps.fr's Introduction

Build Status

Ben Maps

Web maps that don't track you

Screen shot

Why this project?

My day job involves maps. Lots of them. Yet I still open Google Maps on the web whenever I look for a place or need traffic directions. My goal was to create a web interface with enough features to be able to switch my personal usage to it completely, using Mapbox APIs. I wanted to show that it's possible to build a great map experience assembling Mapbox legos, in the open, without any tracking.

Tech

This project was bootstrapped with create-react-app.

I'm using Redux to manage the state, with a middleware component (the api-caller) responsible for all the asynchronous calls.

I use Assembly.css for styling, which shrinks the main CSS code below 60 lines.

The search bar is a fork from react-geocoder, with minor tweaks to be better integrated in the app. When available, additional POI information is retrieved from Wikidata (images, phone numbers, websites, etc.).

The directions are powered by the Directions Traffic API. It leverages anonymous data from millions of users to provide the freshest live traffic information, in order to route you around traffic and give you the best ETAs.

Deployment

This app is deployed with Now.

Map Style and sprites

The sprites and glyphs are hosted on the Mapbox infrastructure.

What's next?

  • Adding tests, I've been lazy
  • More traffic-related features
  • Turn-by-turn directions
  • Ads (just kidding)

benmaps.fr's People

Contributors

benjamintd avatar dependabot[bot] avatar mpmckenna8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

benmaps.fr's Issues

Development mode and settings

I find it helpful to have a dev mode in these redux, react apps with some extra logging and stuff to help figure out what's going on. I especially like redux-logger for figuring out all the actions that are firing as I first checkout how the app is working. See https://github.com/mpmckenna8/mapbox-maps/blob/action_logger/src/index.js#L34 for an example and let me know if it would be wanted to pull request or if there's a better way to do it or if you think this isn't necessary.

Clean up

  • Sort proptypes and all by alphabetical order
  • add isRequired for required proptTypes
  • Stricter eslint
  • Break down components when possible

The marker should not disappear when clicking on the map

User Story
Looking for an address, typing it on the search bar, entry.
I see the marker, right click on the marker to copy paste GPS coordinates.
Then, a click on the map makes the marker disappear. 'Where is my marker?'
While, as a user, I was just expecting the coordinates window to be closed.

But I would also expect a click on the map to keep the marker (as Google Maps does)

image

Sorry for the English grammar mistakes

Map Scale is missing

This is something that we forgot to add to the map. I'd suggest placing it to the right of satellite view switcher instead of stacking it upwards!

Make sprite file publicly available

https://github.com/benjamintd/mapbox-maps/blob/dfda321/src/styles/style.json specifies "sprite": "mapbox://sprites/benjamintd/cj2wkuwc000582spd6gz9cf00". This file doesn't seem to be accessible without your access token. This issue doesn't seem to exist with the glyphs file just below, it seems to have more liberal permissions.

Adding this file to the to the source distribution would probably be the best option here, but it's probably sufficient for now to just change the permissions to make it accessible to everyone.

Feature Request: opening hours

I would want to know if something is open. So a simple "is [open | closed] till [today | tomorrow | Mo-Su] [00-12]:[00-60]" would be appreciated. Furthermore I'd like to see table of opening hours.

For both a public holiday provider would make it more accurate. Though I couldn't find any free.

I hope I'm not the only one interested in this. Thanks!

Feature Request: brand icon pins

Some shops and amenities from OSM have a brand:wikidata tag from which their logo could be pulled. The brand is an important part of many shop and amenity POIs.

Error on map style switch due to needing specific mapbox api key

If the project is run without Benjamin's mapbox api key in the .env file the request for the static image for the primary basemap will fail with https://api.mapbox.com/styles/v1/benjamintd/cj0szkyh5009i2slfhsmxhtni/static/-122.45920072674187,37.7712861641578,15.255089647198925/56x100@2x?access_token=pk.eyJ1IjoibXBtY2tlbm5hOCIsImEiOiJfYWx3RlJZIn0.v-vrWv_t1ytntvWpeePhgQ&attribution=false 404 (Not Found)

But since it's basically just the streets basemap we would just use that link and it will work for any mapbox api user. See https://github.com/mpmckenna8/mapbox-maps/blob/staticlinkfix/src/components/StyleSwitch.js#L32

Blank screen with Firefox

I don't understand, Benmaps returns a blank screen with Firefox 68.0.1.

No problem with Chromium but i don't use it !

Thanks for BenMaps !

Extra information on routes

Here is additional information that might be useful:

  • Add an elevation profile for bike directions (see this example)
  • Add turn by turn instructions and traffic-on-route for car directions

Rebrand?

As this grows into its own thing, maybe we should find an identity separate from Mapbox and the classic map interface everyone is used to.

We need a name, logo, palette, and style :)

Maximize Minimize Button for hiding route information

One thing I find annoying about google maps when getting directions, especially on mobile is that there's often no clear way to toggle between the mapview and all of the map options. Especially while out using the routing feature. I think just having a nice max min button to hide and show all the stuff would be nice and make this usable even before turn by turn directions are added.

See https://mpmckenna8.github.io/mapbox-maps/ and enter a route to see an example of what I was thinking.

Click should remove selected location

Either a left click or a right click is not removing the selected location!

Reproduce

  1. Select a place from the search or use right click and select the coordinate
  2. The location will be selected
  3. Clicking on any other area should ideally remove the selected location - from the search and the marker.

Here is using right click:
screenshot 2017-05-25 16 16 56

One possible use for keeping the selection is to use it in directions: from or to. But we are not really used to this behaviour?

Shareable URLs

At any time, the URL should reflect what the user sees. This way, it becomes easy to share one's location or directions.

Suggestion for the bike route altitude graph

In the bike route altitude graph, make it so if you hover along the graph it shows you the equivalent point in the route map, that way you know exactly where the peaks and slopes are.

Add a right click on the map

Some options should be available on right-click:

  • directions from here
  • directions to here
  • what's here ? (returning the reverse geocoding result and lon, lat copyable to the clipboard)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.