Huawei Cluster Map and View Marker

459 Views Asked by At

I am creating a project in React Native for Huawei and i use this library: "@hmscore/react-native-hms-map".

When creating the map, how can I place the view inside the markup? In MapView I can put inside and draw anything, however in HMSMarker it doesn't allow me, is there a way?


  1. Groups only join when there are at least 6 marks together, is there a way to make groups of 2 marks together?

Thank you very much in advance.

2

There are 2 best solutions below

0
On

If you want to set title and snippet for the marker, it is supported like : sample Or you can define a InfoWindow.

But if you want to define the view of the marker, you cannot use "View" directly.

1
On
  1. Marker can be customized in icon mode:

You can find the parameter description here: https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-References/marker-0000001051150162#section8565252375

And the sample code:

      <HMSMarker
        icon={{
          uri: Image.resolveAssetSource(
            require("../assets/galata-tower.png")
          ).uri,
          width: 140,
          height: 150,
        }}
      >
  1. The min marker number in cluster cannot be changed.