Comments (14)
I'm also seeing this issue, although the map works and goes to the location. The [lat, long]
values are never updating. I'm also seeing it working with searching for a POI or feature, and failing for cities and states.
"react-map-gl": "4.1.1",
"react-map-gl-geocoder": "1.7.0",
Interestingly enough, I had set a height and width on the MapGL
component and it looks like removing this and adding it in the viewport state object fixed my issue.
from react-map-gl-geocoder.
I believe I've fixed the issue with the latest version (v2.0.5). Let me know if you still have any problems after pulling the update.
from react-map-gl-geocoder.
@SamSamskies I can confirm the issue is fixed in our app with the latest version 🎉
Thanks for your effort @SamSamskies and all other contributers to the issue!
from react-map-gl-geocoder.
Hi @NetisGod, I'm not able to reproduce this error. Could you provide a specific search query that causes this error for you? Also, please provide version numbers that you are using for this module as well as react-map-gl.
from react-map-gl-geocoder.
Could you also try logging your viewport values in your render function? Let me know what the values are right before the error happens.
from react-map-gl-geocoder.
I type 'Kenya', for example and then I receive this error. If I type 'Kyiv' it works well.
"react-map-gl-geocoder": "^1.7.0"
"react-map-gl": "^4.1.1"
from react-map-gl-geocoder.
I put console.log(this.props.viewport) in Map.jsx and received next: (Tried to find out what Geocoder writes in viewport right before crush but could not accomplish this, Geocoder crushes earlier)
https://user-images.githubusercontent.com/22257069/55030748-a7b98780-5015-11e9-9aa0-d1d2aa82c5ed.png
Sam, please, run the code at local server to find out more, here it is https://github.com/NetisGod/Viewpoints-issue
from react-map-gl-geocoder.
It worked for me also ! Thank you ! But I can't understand how it can be an issue
from react-map-gl-geocoder.
Seems like you've resolved the problem. Closing this issue. Let me know if you have any other problems.
from react-map-gl-geocoder.
Looks like this PR could be addressing part of the issue that was referenced here. uber-archive/viewport-mercator-project#67
Removing the height and width as I stated earlier did allow me to search using the geocoder control, however it breaks my map, or forces me to set it a fixed width/height. I need to it be 100% width and height of the container.
Back to the original issue, it seems like the lat/long are never being actually passed in, possibly because of the issue I addressed above.
I can confirm this doesn't happen on addresses, but on places and countries.
Do you have any thoughts on this?
from react-map-gl-geocoder.
@CodyMcMichael I haven't been able to recreate any of the issues that you're having, so it's hard to say if that PR has anything to do with your problems.
Feel free to open a new issue for each problem that you're having. Please provide a simple Code Sandbox that demonstrates your issue along with what queries cause problems for you for each issue that you open. You can fork this basic example as a starting point: https://codesandbox.io/s/x9362myl4q.
from react-map-gl-geocoder.
@CodyMcMichael you can set 100% height and with in your state object too, using strings.
@SamSamskies I ran into the same problem and fixed it for now by putting height and width in the state object as @CodyMcMichael suggests. Tried to reproduce the issue by amending your Codesandbox starting point without any luck, tried setting all the dependency versions to the ones I have in my project and align the code but didn't succeed in reproducing the issue in Codesandbox.
I have done a pull request #38 that adds a little note about this to README to save time for future users.
from react-map-gl-geocoder.
@yn5 Thanks for reporting the issue. I'll look into it more this weekend. I can probably force this error by setting the width and height of the viewport to 0 and then figure out what to do from there. I'll probably just use the default zoom instead of trying to fit zoom to the viewport in that case.
from react-map-gl-geocoder.
Just pushed a new version that catches errors thrown by WebMercatorViewport when trying to zoom to bbox. Added some logging to help with debugging.
from react-map-gl-geocoder.
Related Issues (20)
- GeoCoder Marker's Styling Not Working HOT 2
- Search Results Not closing, and marker not dropping HOT 9
- Geocoder doesn't appear in Next.js app HOT 1
- Console error passing object to marker prop
- Suggestions are displayed after setting a default input HOT 3
- External geocoder HOT 1
- React 17? HOT 1
- how to active draggable after search HOT 1
- mapbox-gl neccessary dependency? HOT 1
- How to get the current value? HOT 3
- Typescript import issue HOT 1
- Supporting stand-alone Geocoder without map ? HOT 1
- react-map-gl 7 support HOT 7
- Multiple input options in react app HOT 1
- export 'FlyToInterpolator' (imported as 'r') was not found in 'react-map-gl' HOT 2
- Request to upgrade transitive dependency `http-cache-semantics` in `react-map-gl-geocoder` HOT 1
- Menu stays open HOT 2
- Upon passing Marker="true" into geocoder, no point appears HOT 4
- TypeError: Cannot read property 'remove' of undefined __ Cannot read property 'addControl' of null - HOT 6
- Can Not Use react.map.gl.gecoder with Typescript HOT 4
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 react-map-gl-geocoder.