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
214a78a3
Commit
214a78a3
authored
Jun 11, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整命名:CoordinatePropType => LatLng
parent
1672f986
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
17 deletions
+13
-17
Circle.js
components/Circle.js
+3
-3
MapView.js
components/MapView.js
+2
-6
Marker.js
components/Marker.js
+2
-2
Polygon.js
components/Polygon.js
+2
-2
Polyline.js
components/Polyline.js
+2
-2
PropTypes.js
components/PropTypes.js
+2
-2
No files found.
components/Circle.js
View file @
214a78a3
import
React
,
{
PropTypes
,
Component
}
from
'react'
import
{
requireNativeComponent
,
View
,
PixelRatio
}
from
'react-native'
import
{
CoordinatePropType
}
from
'./PropTypes'
import
{
LatLng
}
from
'./PropTypes'
class
Circle
extends
Component
{
static
propTypes
=
{
...
...
@@ -9,12 +9,12 @@ class Circle extends Component {
/**
* 圆点
*/
center
:
CoordinatePropType
,
center
:
LatLng
.
isRequired
,
/**
* 半径(米)
*/
radius
:
PropTypes
.
number
,
radius
:
PropTypes
.
number
.
isRequired
,
strokeWidth
:
PropTypes
.
number
,
strokeColor
:
PropTypes
.
string
,
...
...
components/MapView.js
View file @
214a78a3
...
...
@@ -5,6 +5,7 @@ import {
View
,
UIManager
,
}
from
'react-native'
import
{
LatLng
}
from
'./PropTypes'
import
Marker
from
'./Marker'
import
InfoWindow
from
'./InfoWindow'
import
Overlay
from
'./Overlay'
...
...
@@ -12,11 +13,6 @@ import Polyline from './Polyline'
import
Polygon
from
'./Polygon'
import
Circle
from
'./Circle'
const
CoordinatePropType
=
PropTypes
.
shape
({
latitude
:
PropTypes
.
number
.
isRequired
,
longitude
:
PropTypes
.
number
.
isRequired
,
})
class
MapView
extends
Component
{
static
propTypes
=
{
...
View
.
propTypes
,
...
...
@@ -100,7 +96,7 @@ class MapView extends Component {
/**
* 设置中心坐标
*/
coordinate
:
CoordinatePropType
,
coordinate
:
LatLng
,
/**
* 设置倾斜角度,取值范围 [0, 60]
...
...
components/Marker.js
View file @
214a78a3
import
React
,
{
PropTypes
,
Component
}
from
'react'
import
{
requireNativeComponent
,
View
,
PixelRatio
}
from
'react-native'
import
{
CoordinatePropType
}
from
'./PropTypes'
import
{
LatLng
}
from
'./PropTypes'
import
InfoWindow
from
'./InfoWindow'
class
Marker
extends
Component
{
...
...
@@ -10,7 +10,7 @@ class Marker extends Component {
/**
* 坐标
*/
coordinate
:
CoordinatePropType
.
isRequired
,
coordinate
:
LatLng
.
isRequired
,
/**
* 标题
...
...
components/Polygon.js
View file @
214a78a3
import
React
,
{
PropTypes
,
Component
}
from
'react'
import
{
requireNativeComponent
,
View
,
PixelRatio
}
from
'react-native'
import
{
CoordinatePropType
}
from
'./PropTypes'
import
{
LatLng
}
from
'./PropTypes'
class
Polygon
extends
Component
{
static
propTypes
=
{
...
View
.
propTypes
,
coordinates
:
PropTypes
.
arrayOf
(
CoordinatePropType
).
isRequired
,
coordinates
:
PropTypes
.
arrayOf
(
LatLng
).
isRequired
,
strokeWidth
:
PropTypes
.
number
,
strokeColor
:
PropTypes
.
string
,
fillColor
:
PropTypes
.
string
,
...
...
components/Polyline.js
View file @
214a78a3
import
React
,
{
PropTypes
,
Component
}
from
'react'
import
{
processColor
,
requireNativeComponent
,
View
,
PixelRatio
}
from
'react-native'
import
{
CoordinatePropType
}
from
'./PropTypes'
import
{
LatLng
}
from
'./PropTypes'
class
Polyline
extends
Component
{
static
propTypes
=
{
...
View
.
propTypes
,
coordinates
:
PropTypes
.
arrayOf
(
CoordinatePropType
).
isRequired
,
coordinates
:
PropTypes
.
arrayOf
(
LatLng
).
isRequired
,
width
:
PropTypes
.
number
,
color
:
PropTypes
.
string
,
zIndex
:
PropTypes
.
number
,
...
...
components/PropTypes.js
View file @
214a78a3
import
{
PropTypes
}
from
'react'
const
CoordinatePropType
=
PropTypes
.
shape
({
const
LatLng
=
PropTypes
.
shape
({
latitude
:
PropTypes
.
number
.
isRequired
,
longitude
:
PropTypes
.
number
.
isRequired
,
})
export
{
CoordinatePropType
}
export
{
LatLng
}
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