mapbox gl - Pbf 层在 android 中不工作

mapbox gl - Pbf layer not working in android

我正在使用 React Native Mapbox GL 并添加了 pbf tile,例如:

<MapboxGL.VectorSource 
  id="idTestSoruce" 
  tms={true} 
  tileUrlTemplates={["url@EPSG:900913_1024@pbf/{z}/{x}/{y}.pbf"]}>
     <MapboxGL.FillLayer 
      id="idTestLayer" 
      sourceID="idTestSoruce" 
      sourceLayerID="plotm" 
      style={{ visibility: "visible", fillColor: "red"}} 
      minZoomLevel={12} 
      maxZoomLevel={22} 
   />
</MapboxGL.VectorSource>

版本信息:

react-native: 0.59.10
@react-native-mapbox-gl/maps: 7.0.8

它在 ios 中运行良好,但在 android 中出现以下错误:

Error while updating property 'tms' of a view managed by: RCTMGVectorSource

我在源代码中更改了以下内容:

发件人:

@ReactProp(name="tms")
public void setTMS(RCTMGLRasterSource source, boolean tms) {
   source.setTMS(tms);
}

收件人:

@ReactProp(name="tms")
public void setTMS(T source, boolean tms) {
   source.setTMS(tms);
}

参考。 : issue link