Giter Club home page Giter Club logo

Comments (9)

tordans avatar tordans commented on June 20, 2024 1

@vogelino thanks, this looks great!

I have two comments:

Link

const OSM_PUMP_EDITOR_URL = https://mapcomplete.osm.be/theme?z=14&lat=52.51486&lon=13.44662&userlayout=https%3A%2F%2Ftordans.github.io%2FMapComplete-ThemeHelper%2FOSM-Berlin-Themes%2Fman_made-walter_well-status-checker%2Ftheme.json&language=de#node`;`

https://github.com/technologiestiftung/giessdenkiez-de/pull/461/files#diff-de388be53c7c138eee97b7cc7868b884d8b1cbe605ca474388d8f5d426caef81R33

The URL has the lat/lon/zoom hard coded which will make the map jump and reload data AFAIK.

Do you have access to the those map props inside the panel? We could then do something like…

const mapCompleteURL = ({lat, lon, zoom, nodeId}) => {
  const mapcompleteUrl ='https://mapcomplete.osm.be/theme'
  const params = new URLSearchParams()
  params.set('userlayout', 'https://tordans.github.io/MapComplete-ThemeHelper/OSM-Berlin-Themes/man_made-walter_well-status-checker/theme.json')
  params.set('lat', lat)
  params.set('lon', lon)
  params.set('z', zoom)
  params.set('language', 'de')
  const selectedPump = `#node/${nodeId}`
  return `${mapcompleteUrl}?${params.toString()}${selectedPump}
}

Wording

OpenStreetMap PumpenInfos bearbeiten

https://github.com/technologiestiftung/giessdenkiez-de/pull/461/files#diff-de388be53c7c138eee97b7cc7868b884d8b1cbe605ca474388d8f5d426caef81R736

I think we can focus this a bit more on the operational status of the pump, since this theme will only allow editing those fields to keep it simple.

How about

Status in OpenStreetMap aktualisieren

or

Status und check in OpenStreetMap aktualisieren


Ping @SupaplexOSM FYI

from giessdenkiez-de.

vogelino avatar vogelino commented on June 20, 2024 1

Hi @tordans. I changed the wording and ported your URL function to our code. However, wenn encoding the latitude and longitude into the URL, the OSM page doesn't load the pumps initially when opened via link but does when entered in the browser search bar. I cannot figure out why this happens. When omitting the lat/lng/zoom, the page loads correctly when opened by zoom. Any idea why this happens?

PS: This PR #466 includes the changes

from giessdenkiez-de.

ff6347 avatar ff6347 commented on June 20, 2024

Hey @tordans Thank you for your editor. We will discuss internally how to handle this.

from giessdenkiez-de.

vogelino avatar vogelino commented on June 20, 2024

Hi @tordans! Great editor! This will make it way easier for people to contribute to better pump information! Thx a lot!

I created a PR #461 based on your comment but with a slightly different UX. Instead of double clicking (Which is IMHO not very intuitive), the tooltip can be stuck by clicking once on a pump. This way the new link "Edit this OSM info" in the tooltip can be reached.

Let me know what you think! :)

Screen.Recording.2022-06-23.at.17.08.12.mov

from giessdenkiez-de.

vogelino avatar vogelino commented on June 20, 2024

@tordans thx for your feedback. These are very good points.

I think we do have those coordinates at this point and we should be able to encode them into the url as suggested.

I also agree with your wording feedback and I root for the first suggestion. @Esshahn what do you think?

I will take care of it next week but feel free to do a PR against staging if you wish us to accelerate the process.

Have a nice weekend!

from giessdenkiez-de.

tordans avatar tordans commented on June 20, 2024

I tested with https://mapcomplete.osm.be/theme.html?userlayout=https%3A%2F%2Ftordans.github.io%2FMapComplete-ThemeHelper%2FOSM-Berlin-Themes%2Fman_made-walter_well-status-checker%2Ftheme.json&language=de#node/5907103888 and it looks like, the lat/lng is not needed at all. I think MapComplete does a lookup of the node first (or early on during render) and then moves the map to this lat/lng right away.
So it look like this is all we need, right (AKA the PR is fine this way)? — I might be missing something …

from giessdenkiez-de.

tordans avatar tordans commented on June 20, 2024

PS: Is the staging URL public so I could test it there (later)?

from giessdenkiez-de.

vogelino avatar vogelino commented on June 20, 2024

Cool! I see it the same way. Yes the PR is fine. Here is the URL: https://deploy-preview-462--giessdenkiez.netlify.app/

from giessdenkiez-de.

tordans avatar tordans commented on June 20, 2024

FYI, I just twittered about this https://twitter.com/osmberlin/status/1546020018856534016.

And this OSMCha list shows all edits made with the editor. RSS

from giessdenkiez-de.

Related Issues (20)

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.