- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 map 初始化中设置了自定义样式 url。喜欢 :
<Mapbox.MapView
styleURL="asset://mystyle.json"
logoEnabled={false}
attributionEnabled={false}
ref={(e) => { this.oMap = e }}
animate={true}
zoomLevel={6}
centerCoordinate={[54.0, 24.0]}
style={{ flex: 1 }}
showUserLocation={true}>
</Mapbox.MapView>
{
"id": "Satellite",
"type": "raster",
"source": "Satellite",
"layout": {
"visibility": "visible"
},
"paint": {
"raster-opacity": 1
}
},
{
"id": "Satellite2",
"type": "raster",
"source": "Satellite",
"layout": {
"visibility": "none"
},
"paint": {
"raster-opacity": 1
}
}
"@mapbox/react-native-mapbox-gl": "^6.1.3"
"react-native": "0.58.9",
最佳答案
最后我得到了解决方案:
constructor() {
this.state = {
lightMap: 'visible',
darkMap: 'none'
};
}
changeMap(){
this.setState({darkMap:'visible'})
}
<MapboxGL.MapView
styleURL="asset://mystyle.json"
logoEnabled={false}
attributionEnabled={false}
ref={(e) => { this.oMap = e }}
zoomLevel={6}
centerCoordinate={[54.0, 24.0]}
style={{ flex: 1 }}>
<MapboxGL.RasterSource
id="idLightMap"
url="LAYERURL1"
tileSize={256}>
<MapboxGL.RasterLayer
id="idLightMap"
sourceID="idLightMap"
style={{visibility: this.state.lightMap}}>
</MapboxGL.RasterLayer>
</MapboxGL.RasterSource>
<MapboxGL.RasterSource
id="idDarkMap"
url="LAYERURL2"
tileSize={256}>
<MapboxGL.RasterLayer
id="idDarkMap"
sourceID="idDarkMap"
style={{visibility: this.state.darkMap}}>
</MapboxGL.RasterLayer>
</MapboxGL.RasterSource>
</MapboxGL.MapView>
关于react-native - 如何在运行时在 react-native-mapbox-gl 中显示/隐藏光栅层(可见性属性可见/无),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55036420/
我正在尝试使用 R 中的 raster 包从光栅对象中提取轮廓线。 rasterToContour 似乎工作良好并且绘制得很好,但在调查时发现轮廓线被分解成不规则的线段。来自 ?rasterToCon
我有两个光栅对象 > x1 class : RasterLayer dimensions : 36, 72, 2592 (nrow, ncol, ncell) resolution
我已经看到与CUPS库相关的两个文件: OpenPrinting/cups-filters/blob/master/filter/imagetoraster.c OpenPrinting/cups-f
有没有办法确保绘图周围的框与栅格范围完全匹配?在下面的内容中,根据设备的比例,在栅格的上方,下方或左侧和右侧都有一个间隙: require(raster) r = raster() r[]= 1 pl
我有下面的代码,可以将图像保存到我的电脑上。我想将该图像绕其中心(或左下角)旋转 45,90 和 135 度,然后另存为 3 个不同的图像。我怎样才能做到这一点? library(raster) r1
我有热敏打印机 X330,我需要打印和从 android 相机获取图像(位图),但我不能...我总是在打印机中得到符号。 文档中说: 打印光栅位图 十六进制 1D 76 30 m xL xH yL y
我是 python 的初学者,我仍在熟悉它的库,如果这是一个新手问题,我很抱歉。我只想显示 4 个波段(R、G、B、NIR)的图像。我想删除 NIR 并保留其他 3 个。我该怎么做?由于 raster
我知道这似乎是一个奇怪的问题,而且确实如此!但是利用 Windows 已经安装的固定宽度字体(例如:Fixedsys)我会节省很多大小(因为我想让最终的 EXE 尽可能小) 从 Windows 上现有
要求: 保留图形模式 API 仅适用于 2D 对象(尽管这些 2D 对象的 3D 变换很有趣) 跨平台 矢量图形绘制 光栅合成 + 支持不透明蒙版 - 当然是硬件加速... 动画 API 封装大小 -
我还在 SO 的 GIS 部分发布了这个问题。因为我不确定这是否是一个“纯”python 问题,所以我也在这里再次提问。 我想知道是否有人在不使用 ArcGIS 的情况下从栅格获取高程数据有一些经验,
我是一名优秀的程序员,十分优秀!