Commit ff7d282f authored by 7c00's avatar 7c00

ios 新增 Marker#centerOffset 接口,Resolve #65

parent 295ceaf9
......@@ -82,13 +82,21 @@ export default class Marker extends BaseComponent {
zIndex: PropTypes.number,
/**
* 设置覆盖物的锚点比例
* 覆盖物锚点比例
*
* @link http://a.amap.com/lbs/static/unzip/Android_Map_Doc/3D/com/amap/api/maps/model/Marker.html#setAnchor-float-float-
* @platform android
*/
anchor: Point,
/**
* 覆盖物偏移位置
*
* @link http://a.amap.com/lbs/static/unzip/iOS_Map_Doc/AMap_iOS_API_Doc_3D/interface_m_a_annotation_view.html#a78f23c1e6a6d92faf12a00877ac278a7
* @platform ios
*/
centerOffset: Point,
/**
* 是否选中,选中时将显示信息窗体,一个地图只能有一个正在选中的 marker
*/
......
......@@ -107,6 +107,7 @@
_pinView.draggable = self.draggable;
_pinView.pinColor = _pinColor;
_pinView.customCalloutView = _calloutView;
_pinView.centerOffset = self.centerOffset;
if (_image != nil) {
_pinView.image = _image;
}
......
......@@ -16,6 +16,7 @@ RCT_EXPORT_MODULE()
}
RCT_EXPORT_VIEW_PROPERTY(coordinate, CLLocationCoordinate2D)
RCT_EXPORT_VIEW_PROPERTY(centerOffset, CGPoint)
RCT_EXPORT_VIEW_PROPERTY(title, NSString)
RCT_EXPORT_VIEW_PROPERTY(description, NSString)
RCT_EXPORT_VIEW_PROPERTY(active, BOOL)
......
{
"name": "react-native-amap3d",
"version": "0.6.2",
"version": "0.7.0",
"description": "react-native 高德地图组件",
"author": "Qiu Xiang <i@7c00.cc>",
"license": "MIT",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment