Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Mobile
react-native-thinknet-mapbox-gl
Commits
3b37bcf7
Commit
3b37bcf7
authored
8 years ago
by
Pavlo Aksonov
Browse files
Options
Download
Patches
Plain Diff
add id attribute to Annotation
parent
7682b261
master
5.2.0
devPinyo
develop
jtm
testMapbox
5.2.2
5.2.1
5.2.0
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0.2
5.1.0.1
5.1.0
testMapbox4.1.5
testMapbox4.1.4
jtm1.2.0
jtm1.1.0
jtm1.0.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Annotation.js
+5
-10
Annotation.js
with
5 additions
and
10 deletions
+5
-10
Annotation.js
+
5
−
10
View file @
3b37bcf7
...
...
@@ -20,7 +20,7 @@ const viewConfig = {
const
propTypes
=
{
...
View
.
propTypes
,
id
:
PropTypes
.
string
.
isRequired
,
title
:
PropTypes
.
string
,
subtitle
:
PropTypes
.
string
,
coordinate
:
PropTypes
.
shape
({
...
...
@@ -31,13 +31,15 @@ const propTypes = {
};
class
MapboxAnnotation
extends
React
.
Component
{
setNativeProps
(
nativeProps
)
{
this
.
marker
.
setNativeProps
(
nativeProps
);
}
render
()
{
return
(
<
RCTMapboxAnnotation
ref
=
{
ref
=>
{
this
.
marker
=
ref
;
}}
{...
this
.
props
}
style
=
{[
styles
.
marker
,
this
.
props
.
style
]}
/
>
);
}
...
...
@@ -46,12 +48,5 @@ class MapboxAnnotation extends React.Component {
MapboxAnnotation
.
propTypes
=
propTypes
;
MapboxAnnotation
.
viewConfig
=
viewConfig
;
const
styles
=
StyleSheet
.
create
({
marker
:
{
position
:
'
absolute
'
,
backgroundColor
:
'
transparent
'
,
},
});
const
RCTMapboxAnnotation
=
requireNativeComponent
(
'
RCTMapboxAnnotation
'
,
MapboxAnnotation
);
module
.
exports
=
MapboxAnnotation
;
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets