|
@@ -94,7 +94,10 @@ class Index extends Component {
|
|
|
fillColor
|
|
|
})
|
|
|
let calloutContent = item.text
|
|
|
- if ((item.estateObj && item.estateObj.length > 10) || (item.schoolObj && item.schoolObj.length > 10)) {
|
|
|
+ if (item.estateObj && item.estateObj.length > 10) {
|
|
|
+ const estateObj = JSON.parse(item.estateObj)
|
|
|
+ calloutContent = `${item.text}(¥${estateObj.price_range})`
|
|
|
+ } else if (item.schoolObj && item.schoolObj.length > 10) {
|
|
|
calloutContent += '>'
|
|
|
}
|
|
|
markerData.push({
|
|
@@ -107,7 +110,7 @@ class Index extends Component {
|
|
|
zIndex: 99,
|
|
|
callout: {
|
|
|
content: calloutContent,
|
|
|
- color: item.fillColor === '#ff0' ? '#FFC82C' : '#fff',
|
|
|
+ color: item.fillColor === '#ff0' ? '#ff0000' : '#fff',
|
|
|
bgColor: item.fillColor || '#369af7',
|
|
|
display: 'ALWAYS',
|
|
|
padding: '6px 10px',
|
|
@@ -175,6 +178,14 @@ class Index extends Component {
|
|
|
|
|
|
|
|
|
renderFooter () {
|
|
|
+ const aArr = [
|
|
|
+ {lng: '115.8544590', lat: '28.6858420', t: '红中区', id: 1},
|
|
|
+ {lng: '115.9831920', lat: '28.7092400', t: '高新', id: 2},
|
|
|
+ {lng: '115.8172940', lat: '28.6538220', t: '红角州', id: 3},
|
|
|
+ {lng: '115.8554760', lat: '28.6307690', t: '朝阳', id: 4},
|
|
|
+ {lng: '115.7901800', lat: '28.5965450', t: '九龙湖', id: 5},
|
|
|
+ {lng: '115.8405690', lat: '28.5902600', t: '象湖', id: 6},
|
|
|
+ ]
|
|
|
const colorArr = [
|
|
|
{color: '#ff0', t: '新楼盘', id: 1},
|
|
|
{color: '#bb9c2c', t: '二手房', id: 2},
|
|
@@ -189,32 +200,40 @@ class Index extends Component {
|
|
|
{color: '#00ff3f', t: '公园', id: 11},
|
|
|
{color: '#4da4ee', t: '医院', id: 12},
|
|
|
]
|
|
|
+ const areaItem = aArr.map((item) => {
|
|
|
+ return (
|
|
|
+ <View className="scl-op t2" key={item.id} onClick={this.areaHandle.bind(this, item)}>{item.t}</View>
|
|
|
+ )
|
|
|
+ })
|
|
|
const colorItem = colorArr.map((item) => {
|
|
|
return (
|
|
|
- <View className="scl-op" key={item.id} style={`background: ${item.color}`}>{item.t}</View>
|
|
|
+ <View className={item.color === '#ff0' ? 'scl-op t3' : 'scl-op'} key={item.id} style={`background: ${item.color}`}>{item.t}</View>
|
|
|
)
|
|
|
})
|
|
|
return (
|
|
|
<View className="scoped-bottom">
|
|
|
<View className='scoped-color-list'>
|
|
|
+ {areaItem}
|
|
|
{colorItem}
|
|
|
</View>
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
- navHandle (uuid) {
|
|
|
+ areaHandle (item) {
|
|
|
+ let { mapDiyObj } = this.state
|
|
|
+ mapDiyObj.center = [item.lng, item.lat]
|
|
|
+ mapDiyObj.cScale = 13
|
|
|
this.setState({
|
|
|
- curUuid: uuid
|
|
|
+ mapDiyObj,
|
|
|
+ prevCenterLocation: {
|
|
|
+ longitude: item.lng,
|
|
|
+ latitude: item.lat,
|
|
|
+ }
|
|
|
}, () => {
|
|
|
- this.getData()
|
|
|
- })
|
|
|
- }
|
|
|
- tipsChange () {
|
|
|
- const { isFooterTipsShow } = this.state
|
|
|
- this.setState({
|
|
|
- isFooterTipsShow: !isFooterTipsShow
|
|
|
+ // this.getCurESData()
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
enablesatelliteChange () {
|
|
|
const { isEnablesatellite, estateArr, schoolArr } = this.state
|
|
|
estateArr.map(item => {
|
|
@@ -263,7 +282,7 @@ class Index extends Component {
|
|
|
}, () => {
|
|
|
this.getCurESData()
|
|
|
})
|
|
|
- }, 800)
|
|
|
+ }, 300)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -310,9 +329,9 @@ class Index extends Component {
|
|
|
<AtNoticebar>
|
|
|
手工绘制,难免出现误差,仅供参考,一切以正式文件为准。
|
|
|
<View onClick={this.enablesatelliteChange.bind(this)} className={isEnablesatellite ? 'm' : 'm t2'}>{isEnablesatellite ? '关闭卫星图' : '开启卫星图'}</View>
|
|
|
- <Navigator url="/pagesOther/map/aftermetro" className="m t3">查看2022-2035最新地铁规划</Navigator>
|
|
|
- <Navigator url="/pagesOther/map/dtl" className="m t3">学区地图</Navigator>
|
|
|
- <Navigator url="/pagesOther/map/vr" className="m t3">航拍</Navigator>
|
|
|
+ <Navigator url="/pagesOther/map/aftermetro" className="m t3">最新地铁规划</Navigator>
|
|
|
+ <Navigator url="/pagesOther/map/dtl" className="m t3">中小学学区地图</Navigator>
|
|
|
+ <Navigator url="/pagesOther/map/vr" className="m t3">航拍VR</Navigator>
|
|
|
</AtNoticebar>
|
|
|
</View>
|
|
|
)
|
|
@@ -341,7 +360,7 @@ class Index extends Component {
|
|
|
render () {
|
|
|
const { mapDiyObj, curScale, polygons, polygonsTextArr } = this.state
|
|
|
const { isEnablesatellite } = this.state
|
|
|
- const markers = curScale > 15 ? JSON.parse(JSON.stringify([...polygonsTextArr])) : []
|
|
|
+ const markers = curScale > 14 ? JSON.parse(JSON.stringify([...polygonsTextArr])) : []
|
|
|
return (
|
|
|
<View className="l-box">
|
|
|
{this.renderHeader()}
|