qiuxiang / react-native-baidumap-sdk Goto Github PK
View Code? Open in Web Editor NEWReact Native BaiduMap SDK for Android + iOS
License: MIT License
React Native BaiduMap SDK for Android + iOS
License: MIT License
<MapView.Marker
key={index}
view={() => <Icon name="start" />}
coordinate={{ latitude: item.latitude, longitude: item.longitude }}
/>
我创建了一个页面组件MapDetail包含如上代码。
width and height must be > 0
createBitmap
Bitmap.java:841
createBitmap
Bitmap.java:820
...
给了2核4g,据你另一个项目说是没有硬件加速所以闪退,但是有其他法子解决吗?
安卓返回闪退是为什么呢 只要引入使用mapview了
折线类为 BMKPolyline,由一组经纬度坐标组成,并以有序序列形式建立一系列的线段。
iOS SDK支持在3D矢量地图上绘制带箭头或有纹理等样式的折线,同时可设置折线端点和连接点的类型,以满足各种绘制线的场景。支持虚线或者纹理图片绘制折线。
这段是iOS SDK的文档中对Polyline的介绍,我们可以通过什么样的方式做到一样的事情吗
See also #20
如题
android 三只手指触摸在地图上会爆红,cannot record touch end without a touch start
问题描述:在MapView中点击一点然后将Marker定在该点(只有一个Marker)
预期效果:点击后Marker出现在点击的点
实际效果:点击后Marker位置并没有变动,拖拽地图移动后Marker才能显示在指定的位置
代码如下:`import React, {Component} from 'react'
import {Alert, StyleSheet} from 'react-native'
import {MapView} from 'react-native-baidumap-sdk'
export default class Dynamic extends Component {
static navigationOptions = {title: 'Dynamically add and remove'}
constructor(props){
super(props)
this.state = {
coordinate : {}
}
}
addMarker = (coordinate) => {
this.setState({
coordinate
})
}
render() {
return (
<MapView style={StyleSheet.absoluteFill} onClick={this.addMarker} >
{
this.state.coordinate.latitude ? (
<MapView.Marker coordinate={this.state.coordinate}/>
) : null
}
</MapView>
)
}
}`
一方面,可以让开发者自行选择初始化的时间。另一方面,提供初始化结果通知,以便更好地定位开发密钥问题。
报错Print: Entry, ":CFBundleIdentifier", Does Not Exist
0.52没有问题
单独定位挺快的,就是切换中心点后,大概有10s的延迟。
已解决:是因为导入的时候,把一些没用的东西导入进来了。。。
集成地图后,应用的大小:安卓增加7M
,ios增加3M
,在正常范围内。
但是这里我是手动拖入地图SDk的,我 pod install 不知道为啥没办法导入 framework ,估计自己项目里不知道哪里配置错了。
感谢作者的开源,真心不错。😁
====================================
原问题
原先18.5M
,集成后25.6M
,增加了7M
,在可接受范围内。
原先21M
,集成后122.1M
,增加了100M
,好像有点大了。
我的RN版本 0.46.4 运行出现下面错误
src\main\java\cn\qiuxiang\react\baidumap\BaiduMapPackage.kt: (12, 1): Class 'B
aiduMapPackage' is not abstract and does not implement abstract member public ab
stract fun createJSModules(): (Mutable)List<Class<out JavaScriptModule!>!>! defi
ned in com.facebook.react.ReactPackage
:react-native-baidumap-sdk:compileReleaseKotlin FAILED
FAILURE: Build failed with an exception.
At com.baidu.mapapi.map.MapView.a(Unknown Source)
什么时候能升级以下sdk版本,目前的版本不支持bitcode,无法打包
有个搜索兴趣点的功能 标记周围的学校啥的 这个好做么?
百度地图只有空白网格,感觉应该是百度AK的原因,但弄了半天也弄不出来,求帮忙,感觉keystore没有作用啊
1,自定义View图片加载问题,使用resizeMode时图片无法加载
安卓 MapView.Callout 不能增加点击事件吗?IOS是好的
如何跳转到百度地图导航的api不知道有没有
如题
在执行 Initializer.init('XXX').catch(e => console.error(e)) 这句时报错 permission check error
04-19 21:35:21.735 7795 7826 E ReactNativeJS: { [Error: permission check error] framesToPop: 1, code: '101' }
地图空白只显示网格(真机和Genymotion模拟器下都是这种情况)
{
"name": "qiuxiangbdmapexample",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.2.0",
"react-native": "0.52.0",
"react-native-baidumap-sdk": "^0.3.2",
"react-navigation": "^1.1.2"
},
"devDependencies": {
"babel-jest": "22.4.0",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.0",
"react-test-renderer": "16.2.0"
},
"jest": {
"preset": "react-native"
}
}
这个圆圈设置颜色后会一直往上铺,颜色会越来越深
<MapView.Circle
center={this.state.circleCenter}
radius={500}
strokeWidth={1}
strokeColor="rgba(162, 165, 167, 1.0)"
fillColor="rgba(0, 0, 0, 0)"
/>
就是这个
我在高德的那个组件下看到有离线的功能,百度地图下是没有加吗
使用Pod 安装其他第三方包可以
安装这个包 会显示
Downloading dependencies
Installing BaiduMapKit (3.4.4)
持续很长时间然后显示失败
Git download
Git download
$ /usr/bin/git clone https://github.com/BaiduLBS/BaiduMapKit.git /var/folders/09/ws9x9qcx0vnd2g04w59lh7jc0000gn/T/d20180329-50121-iqqyjz
--template= --single-branch --depth 1 --branch 3.4.4
Cloning into '/var/folders/09/ws9x9qcx0vnd2g04w59lh7jc0000gn/T/d20180329-50121-iqqyjz'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
[!] Error installing BaiduMapKit
[!] /usr/bin/git clone https://github.com/BaiduLBS/BaiduMapKit.git /var/folders/09/ws9x9qcx0vnd2g04w59lh7jc0000gn/T/d20180329-50121-iqqyjz --template= --single-branch --depth 1 --branch 3.4.4
Cloning into '/var/folders/09/ws9x9qcx0vnd2g04w59lh7jc0000gn/T/d20180329-50121-iqqyjz'...
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
您好,我有个问题:
1.定位是返回的信息能否含有地址等详细信息,不只是经纬度
2.获取定位信息的详细地址是否只能通过Geocode.reverse获取
谢谢!!!
文字有点多不会英文了,sorry
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.