<template>
	<view>
		<view class="page-body">
			<view class="page-section page-section-gap">
				<map style="width: 100%; height: 100vh;" :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="markertap">
				</map>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 31.007369,
				longitude: 121.220779,
				covers: [{ //上海松江区中心医院
						id: 1,
						latitude: 31.007369,
						longitude: 121.220779,
						iconPath: '../../../static/location.png'
					}, { //上海长海医院
						id: 2,
						latitude: 31.308496,
						longitude: 121.528046,
						iconPath: '../../../static/location.png'
					},
					{ //上海市普陀区中心医院
						id: 3,
						latitude: 31.241539,
						longitude: 121.404159,
						iconPath: '../../../static/location.png'
					},
					{ //复旦大学附属华山医院
						id: 4,
						latitude: 31.216063,
						longitude: 121.442959,
						iconPath: '../../../static/location.png'
					},
					{ //上海岳阳中西医结合医院
						id: 5,
						latitude: 31.289025,
						longitude: 121.489021,
						iconPath: '../../../static/location.png'
					},
					{ //上海中医药大学附属上海市中西医结合医院
						id: 6,
						latitude: 31.257515,
						longitude: 121.511342,
						iconPath: '../../../static/location.png'
					},
					{ //,31.266814,121.431333,同济大学附属同济医院
						id: 7,
						latitude: 31.266814,
						longitude: 121.431333,
						iconPath: '../../../static/location.png'
					},
					{ //,31.058799,121.736793,上海市浦东医院
						id: 8,
						latitude: 31.058799,
						longitude: 121.736793,
						iconPath: '../../../static/location.png'
					},
					{ //,31.167401,121.433327,上海市第八人民医院
						id: 9,
						latitude: 31.167401,
						longitude: 121.433327,
						iconPath: '../../../static/location.png'
					},
					{ //,31.617353,121.398665,上海交通大学医学院附属新华医院(崇明)
						id: 10,
						latitude: 31.617353,
						longitude: 121.398665,
						iconPath: '../../../static/location.png'
					},
					{ //31.205191,121.422583,上海市光华中西医结合医院
						id: 11,
						latitude: 31.205191,
						longitude: 121.422583,
						iconPath: '../../../static/location.png'
					},
					{ //31.387563,121.239428,嘉定区中心医院
						id: 12,
						latitude: 31.387563,
						longitude: 121.239428,
						iconPath: '../../../static/location.png'
					},
				]
			}
		},
		methods: {
			markertap({markerId}) {
				this.$emit('markertap',markerId)
			}
		}
	}
</script>

<style>
</style>
