Comments (2)
Ah yes, that is correct. The lane attributes information is fetched when viewing details about an intersection and makes one OSM API request for that intersection.
I think making an extra request for every pin would be an unacceptable number of extra requests to the OSM API - I'm already uncomfortable with the number it current makes to get node positions.
Possibly in the short term we should only focus on filtering on cycle time? I'm thinking something like:
- two textboxes, one a min and one a max cycle time to show on the map
- a custom component with two sliders, allowing to set an interval (min/max).
Long term it probably makes sense to either:
- pre-fetch all the data, make all the requests to the OSM API and statically render the site and data
- set up a backend to cache requests for nodes
For simplicity's sake and for keeping the website responsive to new submissions I'm inclined to keep it live generated as long as possible! Open to suggestions though.
from better-intersections.
Hi Jake, Hope moving isn't proving to be too stressful 🏠. To filter points using lanes I believe that we have to get the OsmWayKeys
tags for each intersection and I have checked the openstreetmap API, it seems there is no api to fetch multiple ways. So, I was thinking of fetching the ways for each intersection at the beginning.
export interface IntersectionStats {
osmId: string;
lat: number,
lon: number,
reports: TrafficLightReport[];
tags: Record<string, string>;
way: Way; /** Here we add a way field in the IntersectionStats interface /
}
But I feel like it's a bit inefficient to send a fetch req for every single point, but I can't think of any other way?
from better-intersections.
Related Issues (20)
- Fix `Warning: ReactDOM.render is no longer supported in React 18.` error
- Intersection stats pop up is below cycle time filter
- Minimise title info box on mobile HOT 1
- Improve overflow when lots of measurements of one intersection HOT 3
- Add CSV export of Supabase Postgres HOT 3
- Cache majority of OSM API requests HOT 1
- Investigate loading map at users rough location without location permission
- Add app version, and include version string with submission into new DB field
- Add query parameter or additional path to `/contribute-measurement` with node ID HOT 1
- Group measurements of intersections not at two stage crossings HOT 1
- Encourage measurements at other stage of multi stage crossings HOT 1
- Ensure form is completely reset after submission HOT 1
- Format timestamps in local time rather than UTC HOT 2
- No intersection Pins showing HOT 1
- "Filter by cycle time" slider can't be dragged on mobile HOT 1
- 'Cycle Length' should be rounded HOT 1
- Store traffic light coordinates as well as node IDs HOT 12
- Keystrokes in submission form trigger image redownload
- Geolocation button on map invisble without scrolling in iOS Safari
- Reinstate optional frontend field for RMS traffic signal ID on submission
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from better-intersections.