-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: send geolocation as adapter #10232
Conversation
|
What's the motivation or use case for this? Isn't window.navigator.geolocation really the only geolocation provider? How else would it be provided if not window.navigator.geolocation? |
@andrewharvey You're right but this PR related to #10234 (comment), by this PR we can override the geolocation function. for example, we want to show a popup UI before getting the user's location or ignore some coordinates |
@andrewharvey Also imagine we going to enhance user location by their behavior and we don't want to relying on native geolocation. |
Co-authored-by: Vladimir Agafonkin <[email protected]>
Same issue here, I want to build a PWA wrapped in a native app. In this case I prefer native app to provide GPS coordinates but with this implementation mapbox goes directly to the browser APIs. |
@ImanMh Thanks, It's an awesome use case |
* add changelog and bump package version * Update style-spec changelog and bump package version * bump to dev versions Co-authored-by: Arindam Bose <[email protected]>
@andrewharvey what is your opinion? |
@mourner this looks good to me. Thoughts? |
* return a promise in "once" if no listener provided * fix ambiguity in map.once docs
…ties (mapbox#10272) * update style spec * multiple min/max * edit validation, add test cases * fix linting error * add min/max to array element spec * fix error messages * Remove render test * Replace render test line-dasharray/unusual-cases/negative-values by unit test * Use new test fixturest Co-authored-by: Karim Naaji <[email protected]>
* fix blurry map-pitched labels on terrain * update render tests
…n release process (mapbox#10285)
* Fix JSDoc lint warnings * Fix new JSDoc warnings
…0308) * Revert "Hardcode fallback token in release test page (mapbox#10306)" This reverts commit f352188. * Revert 6a2531e
…apbox#10258) * Fix issue mapbox#10186: not preserving drawn order while using terrain render cache - Revise terrain render loop to be more explicit and easier to follow from the painter render passes: - Remove any painter modifications from render() function - Extract terrain draw depth to reduce branching and add explicit call from painter.render() - Make it explicit that all rendering of terrain happens in the translucent render pass - Update terrain.render() to work as follow: - In render cache mode: . Draw all layers of sequential draped and add to render cache . Switch to interleaved render mode (not cached) for other layers - Add debug/10186 sample code for simple reproduction case * Update 3d playground with more styles to test from * Add helper function to calculate render cache efficiency * Update render test baseline with correct terrain drawn order * Update 3d playground example - Add mapbox/satellite-streets-v11 style - Add back mistakenly removed fill-extrusion layer * Add render tests * layerEnd -> lastDrawnLayerIndex * Self review: Comment + renaming * Check render cache efficiency on style order changes * Add more information on render cache efficiency warning * Fix wrong variable naming and unit test to not warn * Add unit tests * Calculate list of sequential draped render batches * Consume draped layer batches * Create getter for style._order to allow split with drape first order * Move isLayerDraped to style * Minor tweak * Load list of draped first layers when terrain is enabled * Assign FBOs to renderable terrain batches * Don't render empty batches * Fix bug not clearing raster fade if any source is not RasterTileSource Minor syntax tweak * Use draped render batches in terrain.render() * Simplify render loop * Move terrain depth render earlier to reduce framebuffer switches * Update terrain-debug to add custom layer for debugging * Add map.options.optimizeForTerrain and update unit tests * Update render tests to account for map.options.optimizeForTerrain * Fix Flow + Lint + render tests * Remove extraneous flag * Add documentation and update comments * Add warning and guidance on low render cache efficiency * Revert using cached mode always This should be addressed in separate PR, needs to take into account video source type and feature state changes in order to invalidate the render cache. * Address review comments Thanks @arindam1993
…ed (mapbox#10347) * Do not depend on underlaying height property to assess flat roofs * Add regression render test * Remove extraneous tiles * Add test sample page for fill-extrusion querying on terrain * Add fill extrusion querying as part of release testing * Fix getLoadedBucket when not overzoomed when using client data sources * Remove dependency on 'type' feature property Co-authored-by: Vladimir Agafonkin <[email protected]> * Address review comments * Address review feedback: Trim down example size * Address @arindam1993's comment Co-authored-by: Vladimir Agafonkin <[email protected]>
Co-authored-by: Colleen McGinnis <[email protected]>
@behnammodi it's best if you can rebase and verify the changes locally before merging the changes. |
@asheemmamoowala All right, I will do it |
* use native ES modules for unit tests * update CircleCI Node image to v14.15 * bump yarn cache key on Circle CI * expose bundles as CommonJS in Node * upgrade postcss and use CJS for config * convert harness and some scripts to esm * fix lint and flow * make sure testem runs with native esm * testem fixups * use custom json loader to support named exports * use a valid access token in unit tests * work around testem refusing to load cjs configs * fix lint * fix testem runs on CI hopefully * fix webpack build
This change accounts for scale during DOM events processing and fixes mapbox#6079
…i/mapbox-gl-js into geolocation-as-adapter
@asheemmamoowala I did it, but I need someone to help me for 4 failed stage |
@behnammodi , I rebased your branch off of main in https://github.com/mapbox/mapbox-gl-js/tree/karim/behnammodi-pr10232-rebased. The CI job did not pass on unit tests and build (render tests failure is unrelated), https://app.circleci.com/pipelines/github/mapbox/mapbox-gl-js/5920/workflows/4ebe7ae1-c43f-425e-bbcc-2e62cf6c29d0. Could you try the following:
And then open up a new PR so the discussion can continue on a clean diff? We'll close this PR then. |
@karimnaaji Thank you for your help, I did it #10400 |
@behnammodi Sounds good, thanks the diff look more approachable now! Closing this PR and I'll tag whoever was involved in reviewing this one there. |
geolocation
behavior.So now we have:
I'll say welcome to your awesome feedback :)