HMS-Core / hms-react-native-plugin

This repo contains all of React-Native HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
235 stars 67 forks source link

react-native-hms-map: map not rendering #266

Closed MateuszRostkowski closed 1 year ago

MateuszRostkowski commented 1 year ago

Description Maps are not rendering, there is only displayed background, with PetalMaps title.

I have correctly followed instalation proces:

Expected behavior Map should render normally

Current behavior Map is not rendering

Screenshots

Zrzut ekranu 2023-02-2 o 10 01 00

Logs

Environment

Other I'm running tests with debugging cloud on app gallery connect platform.

MateuszRostkowski commented 1 year ago

I resolve this issue adding mapType prop like this:

enum HMSMapType {
  NONE = 0, // Empty grid map.
  NORMAL = 1, // Basic map.
  TERRAIN = 3, // Terrain map.
}

<HMSMap
    ref={mapRef}
    mapType={HMSMapType.NORMAL}
    camera={{ target: { latitude: 0, longitude: 0 }, zoom: 20 }}
/>
MateuszRostkowski commented 1 year ago

I'm still struggling with performance of the map component:

Edit: Actually I found the cause of this issue. I was passing a lot of markers to the map (around 400 - 500) and clustering wasn't making this more performant. I will work on my own solution for that.