-
Notifications
You must be signed in to change notification settings - Fork 18
Switch to OSM for maps #447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for tsml-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
fix tests add test for markers
hey @pjaudiomv is it ok if i push a commit on this branch that removes mapbox (except to power location search) and fixes some CSS issues? |
Oh I thought it was a fork but ya do whatever you need to do |
Ya OSM is nice because free, open source, no api keys. no corporate entity tracking you. pretty big open source eco system. you can use different tile providers if wanted |
oh weird it seems you already pushed, how does that work with a fork. either way ya go ahead |
yeah i synced with main already. later tonight ill try to push the change i mentioned |
cool looks better fixed css, and its opening info modal with single meeting again |
hi @Hiro-Tokyo we're considering a change to TSML UI away from Mapbox to Open Street Maps. these are less pretty but they are free! before we change i wanted to check with you that this doesn't majorly degrade the experience in japan? here is a demo: https://deploy-preview-447--tsml-ui.netlify.app/tests/japan.html?view=map please let us know what you think! thanks |
Hi @joshreisner Please let me check with some local service offices crew! I will let you know how we think about. |
Are there any advantages and disadvantages? |
hi @Hiro-Tokyo the main advantages are:
the main disadvantages
given these tradeoffs, the team is leaning toward adopting the new approach, but we want to make sure there isn't a problem with the default appearance that would cause problems on non-english sites ![]() it is possible to use custom map appearances but we're still learning about that |
right: 0; | ||
} | ||
|
||
@media ${media.lgAndUp} { | ||
grid-auto-columns: minmax(0, 1fr); | ||
grid-auto-flow: column; | ||
|
||
& > div:nth-child(2) > div > div { | ||
& > div:nth-of-type(2) > div > div { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
react complains about nth-child
@@ -1,7 +1,7 @@ | |||
let mix = require('laravel-mix'); | |||
const webpack = require('webpack'); | |||
|
|||
mix.options({publicPath: 'public/'}); | |||
mix.options({ publicPath: 'public/', processCssUrls: false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this so the build step would not publish leaflet image files into the public directory
README.md
Outdated
tiles_dark: { | ||
attribution: | ||
'© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', | ||
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think stadiamaps requires a api key, like it works fine on 127.0.0.1 or localhost but in production you need a key. so to use darkmode you would have to do url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png?api_key=db30b16c-caba-blah',
https://docs.stadiamaps.com/authentication/#local-development
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://gist.github.com/BrendonKoz/b1df234fe3ee388b402cd8e98f7eedbd I did see a response on this fun thread from OSM team that they are working on actual darkmode vectors https://en.osm.town/@osm_tech/113482687301656785
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks that's a good callout - this is the dark mode value that i added to the aasanjose story (i didn't need an API key but i did need to set up authorized domains). i just added this as an example for the documentation, but perhaps i should either make this obviously fictitious or pick another one that works out of the box?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find one that didn't need a key, I think either make fictions or just add note about possibly needing keys for different map providers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this totally works
map: {
tiles: {
attribution: `Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>`,
url: 'https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ij_MY_KEY_HERE',
},
tiles_dark: {
attribution: `Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>`,
url: 'https://api.mapbox.com/styles/v1/mapbox/dark-v10/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ij_MY_KEY_HERE',
},
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if you wanted to you could still support mapbox with the smallest of code changes (just pass in key to tiles)
Hi @joshreisner Thank you for your information! We think it will be okay to change to Open Street Map basically. OSM information provides some old information, venue name, street name... so we need to edit them, though. |
Hi @joshreisner seemed already changed to OSM so can we remove MapBox settings on our website? |
@Hiro-Tokyo yes, but i would wait a month - just in case we need to roll back |
Okay thanks! |
This add support for OpenStreetMaps which doesn't require api keys. Obviously not as pretty and nice as the mapbox tiles but it allows maps to work with no key which is nice.Updated PR description 5/17: