React-instantsearch: Error map render

Created on 27 Apr 2020  Â·  4Comments  Â·  Source: algolia/react-instantsearch

https://github.com/algolia/react-instantsearch/blob/b41bff237e536a3da7e69988b2e9678a0e44d7d3/packages/react-instantsearch-dom-maps/src/Provider.js#L65

ERROR:

hd {
    message: "not a LatLng or LatLngLiteral: in property lat: not a number",
    name: "InvalidValueError", 
    stack: "Error↵    at new hd (https://maps.googleapis.com/m…lopment/pages/index.js?ts=1587989623324:25869:10)"
}
    _.Md                       @    js?v=quarterly&key=A…RjGZSZ_5AAijXALA:64
    _.Td.extend                @    js?v=quarterly&key=A…jGZSZ_5AAijXALA:177
    (anonymous)                @    Provider.js:106
    createBoundingBoxFromHits  @    Provider.js:105
    render                     @    Provider.js:126
    finishClassComponent       @    react-dom.development.js:17160
    updateClassComponent       @    react-dom.development.js:17110
    beginWork                  @    react-dom.development.js:18620

In this line, not expect hit._geoloc as Array LatLng.
How do I use this component to render my hits?

Ex Hit:
{ "type": "store", "name": "RR Info", _geoloc: [{ lat: -22.97242, lng: -43.18958 }] }

Most helpful comment

Sorry, the geosearch widgets only accept a single _geoLoc entry yet. The best way forward is to fork the component and check if the geoloc is an array or an object and extending deeply

https://github.com/algolia/react-instantsearch/pull/2920

All 4 comments

Sorry, the geosearch widgets only accept a single _geoLoc entry yet. The best way forward is to fork the component and check if the geoloc is an array or an object and extending deeply

How do i create a PR, for you are review and approve.

Sorry, the geosearch widgets only accept a single _geoLoc entry yet. The best way forward is to fork the component and check if the geoloc is an array or an object and extending deeply

https://github.com/algolia/react-instantsearch/pull/2920

Was this page helpful?
0 / 5 - 0 ratings