Coder Social home page Coder Social logo

Comments (6)

SamSamskies avatar SamSamskies commented on June 12, 2024 1

Should be fixed now. The zooming can be improved to zoom in on the bounding box of the area that is searched for. I'll add that later.

Note that there's a new required prop called onViewportChange.

Let me know if you have any problems.

from react-map-gl-geocoder.

SamSamskies avatar SamSamskies commented on June 12, 2024

Thanks for reporting these bugs. I'm probably not going to have time to fix this tonight, so feel free to have a go at it.

from react-map-gl-geocoder.

SamSamskies avatar SamSamskies commented on June 12, 2024

You could probably listen for the zoomend event and update the lat, lng, and zoom of the viewport then.

from react-map-gl-geocoder.

jaronheard avatar jaronheard commented on June 12, 2024

Spent a little more time looking at this, and the implementation of the onViewportChange in NavigationControl was significantly more involved than I thought it was going to be. Listening for zoomend sounds promising, but not sure on implementation details for that.

from react-map-gl-geocoder.

SamSamskies avatar SamSamskies commented on June 12, 2024

The results and result event from mapbox-gl-geocoder might also be worth looking into.
https://github.com/mapbox/mapbox-gl-geocoder/blob/master/API.md

Here's the docs for the zoomend mapbox-gl map event.
https://www.mapbox.com/mapbox-gl-js/api/#map.event:zoomend

I think we may need to get rid of the the animation transition to get this to work. I'm not sure how we'd animate deck.gl layers along with the base map.

If I get a second wind later tonight, I'll have a crack at it.

from react-map-gl-geocoder.

jaronheard avatar jaronheard commented on June 12, 2024

Cheers, thanks for this! Works great with deck.gl layers now, including during animation.

from react-map-gl-geocoder.

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.