Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-amap3d
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-amap3d
Commits
f468c060
Commit
f468c060
authored
Jun 21, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
059ce10b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
README.md
README.md
+2
-2
AMapPolygon.m
ios/AMapPolygon.m
+7
-7
AMapPolyline.m
ios/AMapPolyline.m
+7
-7
No files found.
README.md
View file @
f468c060
...
@@ -163,6 +163,6 @@ import MapView from 'react-native-amap3d'
...
@@ -163,6 +163,6 @@ import MapView from 'react-native-amap3d'
-
[
x
]
自定义图标
-
[
x
]
自定义图标
-
[
x
]
折线绘制(Polyline)
-
[
x
]
折线绘制(Polyline)
-
[
x
]
多边形绘制(Polygon)
-
[
x
]
多边形绘制(Polygon)
-
[
]
圆形绘制(Circle)🚀
-
[
x
]
圆形绘制(Circle)
-
[
]
POI 检索
-
[
]
POI 检索
🚀
-
[
]
地理编码转换
-
[
]
地理编码转换
ios/AMapPolygon.m
View file @
f468c060
...
@@ -16,14 +16,7 @@
...
@@ -16,14 +16,7 @@
for
(
NSUInteger
i
=
0
;
i
<
coordinates
.
count
;
i
++
)
{
for
(
NSUInteger
i
=
0
;
i
<
coordinates
.
count
;
i
++
)
{
coords
[
i
]
=
coordinates
[
i
].
coordinate
;
coords
[
i
]
=
coordinates
[
i
].
coordinate
;
}
}
if
(
_strokeColor
==
nil
)
{
_strokeColor
=
UIColor
.
blackColor
;
}
_polygon
=
[
MAPolygon
polygonWithCoordinates
:
coords
count
:
coordinates
.
count
];
_polygon
=
[
MAPolygon
polygonWithCoordinates
:
coords
count
:
coordinates
.
count
];
_renderer
=
[[
MAPolygonRenderer
alloc
]
initWithPolygon
:
_polygon
];
_renderer
.
lineWidth
=
_strokeWidth
;
_renderer
.
strokeColor
=
_strokeColor
;
_renderer
.
fillColor
=
_fillColor
;
}
}
-
(
void
)
setStrokeWidth
:
(
CGFloat
)
strokeWidth
{
-
(
void
)
setStrokeWidth
:
(
CGFloat
)
strokeWidth
{
...
@@ -50,6 +43,13 @@
...
@@ -50,6 +43,13 @@
}
}
-
(
MAOverlayRenderer
*
)
renderer
{
-
(
MAOverlayRenderer
*
)
renderer
{
if
(
_strokeColor
==
nil
)
{
_strokeColor
=
UIColor
.
blackColor
;
}
_renderer
=
[[
MAPolygonRenderer
alloc
]
initWithPolygon
:
_polygon
];
_renderer
.
lineWidth
=
_strokeWidth
;
_renderer
.
strokeColor
=
_strokeColor
;
_renderer
.
fillColor
=
_fillColor
;
return
_renderer
;
return
_renderer
;
}
}
...
...
ios/AMapPolyline.m
View file @
f468c060
...
@@ -16,14 +16,7 @@
...
@@ -16,14 +16,7 @@
for
(
NSUInteger
i
=
0
;
i
<
coordinates
.
count
;
i
++
)
{
for
(
NSUInteger
i
=
0
;
i
<
coordinates
.
count
;
i
++
)
{
coords
[
i
]
=
coordinates
[
i
].
coordinate
;
coords
[
i
]
=
coordinates
[
i
].
coordinate
;
}
}
if
(
_color
==
nil
)
{
_color
=
UIColor
.
blackColor
;
}
_polyline
=
[
MAPolyline
polylineWithCoordinates
:
coords
count
:
coordinates
.
count
];
_polyline
=
[
MAPolyline
polylineWithCoordinates
:
coords
count
:
coordinates
.
count
];
_renderer
=
[[
MAPolylineRenderer
alloc
]
initWithPolyline
:
_polyline
];
_renderer
.
lineWidth
=
_width
;
_renderer
.
strokeColor
=
_color
;
_renderer
.
lineDash
=
_dashed
;
}
}
-
(
void
)
setWidth
:
(
CGFloat
)
width
{
-
(
void
)
setWidth
:
(
CGFloat
)
width
{
...
@@ -50,6 +43,13 @@
...
@@ -50,6 +43,13 @@
}
}
-
(
MAOverlayRenderer
*
)
renderer
{
-
(
MAOverlayRenderer
*
)
renderer
{
if
(
_color
==
nil
)
{
_color
=
UIColor
.
blackColor
;
}
_renderer
=
[[
MAPolylineRenderer
alloc
]
initWithPolyline
:
_polyline
];
_renderer
.
lineWidth
=
_width
;
_renderer
.
strokeColor
=
_color
;
_renderer
.
lineDash
=
_dashed
;
return
_renderer
;
return
_renderer
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment