algolia / algolia/instantsearch

Error map render

Open
#5,259 4 comments 0 reactions 0 assignees View on GitHub
Library: React InstantSearch < 7
Dominant language
TypeScript
Stars
4.1k
Forks
553
Avg merge
1d 11h
Merged PRs (30d)
51

Description

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

ERROR:
```console
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
}]
}```

Contributor guide

Open the contributing guide

Research direction

Read packages/react-instantsearch-dom-maps/src/Provider.js around lines 65 and 105-126, starting with createBoundingBoxFromHits and the render path shown in the stack trace. Verify the expected _geoloc shape against the provided array example and confirm that valid hits render without the Google Maps InvalidValueError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.