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
b9afcfbb
Commit
b9afcfbb
authored
Jun 30, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 marker 自定义颜色方案说明
parent
57df96f8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
Marker.js
components/Marker.js
+5
-1
flag.png
example/images/flag.png
+0
-0
marker.png
example/images/marker.png
+0
-0
marker.js
example/src/examples/marker.js
+15
-1
No files found.
components/Marker.js
View file @
b9afcfbb
...
@@ -26,7 +26,11 @@ export default class Marker extends Component {
...
@@ -26,7 +26,11 @@ export default class Marker extends Component {
* 自定义图标
* 自定义图标
*
*
* 可以是回调函数返回的自定义 View,需要注意的是,
* 可以是回调函数返回的自定义 View,需要注意的是,
* Root View 必须是 Overlay,且需设置 style width
* Root View 必须是 Overlay,且需设置 style width。
*
* 内置的颜色有限,如需真正的自定义颜色,
* 建议使用自定义 View 引用 Image,如此,
* 任何颜色都可以通过 tintColor 进行设置。
*/
*/
icon
:
PropTypes
.
oneOfType
([
icon
:
PropTypes
.
oneOfType
([
Platform
.
select
({
Platform
.
select
({
...
...
example/images/flag.png
0 → 100644
View file @
b9afcfbb
10.2 KB
example/images/marker.png
View replaced file @
57df96f8
View file @
b9afcfbb
10.2 KB
|
W:
|
H:
683 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
example/src/examples/marker.js
View file @
b9afcfbb
...
@@ -52,7 +52,7 @@ export default class MarkerExample extends Component {
...
@@ -52,7 +52,7 @@ export default class MarkerExample extends Component {
<
Marker
<
Marker
icon
=
{()
=>
icon
=
{()
=>
<
View
style
=
{
styles
.
customIcon
}
>
<
View
style
=
{
styles
.
customIcon
}
>
<
Image
style
=
{
styles
.
customIcon
}
source
=
{
require
(
'../../images/
marker
.png'
)}
/
>
<
Image
style
=
{
styles
.
customIcon
}
source
=
{
require
(
'../../images/
flag
.png'
)}
/
>
<
/View
>
<
/View
>
}
}
title
=
'自定义图片'
title
=
'自定义图片'
...
@@ -62,6 +62,20 @@ export default class MarkerExample extends Component {
...
@@ -62,6 +62,20 @@ export default class MarkerExample extends Component {
longitude
:
116.397972
,
longitude
:
116.397972
,
}}
}}
/
>
/
>
<
Marker
icon
=
{()
=>
<
View
style
=
{
styles
.
customIcon
}
>
<
Image
style
=
{[
styles
.
customIcon
,
{
tintColor
:
'#e91e63'
}]}
source
=
{
require
(
'../../images/marker.png'
)}
/
>
<
/View
>
}
title
=
'自定义颜色'
coordinate
=
{{
latitude
:
39.806901
,
longitude
:
116.457972
,
}}
/
>
<
Marker
<
Marker
title
=
'Custom View Marker'
title
=
'Custom View Marker'
icon
=
{()
=>
icon
=
{()
=>
...
...
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