fix: marker event

This commit is contained in:
thinkinggis 2020-04-07 11:24:59 +08:00
parent 969e873b8e
commit f67e5aa28c
8 changed files with 8 additions and 10 deletions

View File

@ -79,7 +79,7 @@ const World = React.memo(function Map() {
).then((d) => d.json()),
// https://lab.isaaclin.cn/nCoV/api/area?latest=1
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0676f102-22f6-4c75-ab12-1ae200834b1c.json',
'https://gw.alipayobjects.com/os/bmw-prod/55a7dd2e-3fb4-4442-8899-900bb03ee67a.json',
).then((d) => d.json()),
]);
const worldData = joinData(geoData, ncovData.results);

View File

@ -88,7 +88,7 @@ const World = React.memo(function Map() {
).then((d) => d.json()),
// https://lab.isaaclin.cn/nCoV/api/area?latest=1
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0676f102-22f6-4c75-ab12-1ae200834b1c.json',
'https://gw.alipayobjects.com/os/bmw-prod/55a7dd2e-3fb4-4442-8899-900bb03ee67a.json',
).then((d) => d.json()),
]);
const worldData = joinData(geoData, ncovData.results);

View File

@ -73,7 +73,7 @@ const World = React.memo(function Map() {
).then((d) => d.json()),
// https://lab.isaaclin.cn/nCoV/api/area?latest=1
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0676f102-22f6-4c75-ab12-1ae200834b1c.json',
'https://gw.alipayobjects.com/os/bmw-prod/55a7dd2e-3fb4-4442-8899-900bb03ee67a.json',
).then((d) => d.json()),
]);
const worldData = joinData(geoData, ncovData.results);

View File

@ -72,7 +72,7 @@ const World = React.memo(function Map() {
).then((d) => d.json()),
// https://lab.isaaclin.cn/nCoV/api/area?latest=1
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0676f102-22f6-4c75-ab12-1ae200834b1c.json',
'https://gw.alipayobjects.com/os/bmw-prod/55a7dd2e-3fb4-4442-8899-900bb03ee67a.json',
).then((d) => d.json()),
]);
setData(joinData(geoData, ncovData.results));

View File

@ -73,7 +73,7 @@ const World = React.memo(function Map() {
).then((d) => d.json()),
// https://lab.isaaclin.cn/nCoV/api/area?latest=1
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0676f102-22f6-4c75-ab12-1ae200834b1c.json',
'https://gw.alipayobjects.com/os/bmw-prod/55a7dd2e-3fb4-4442-8899-900bb03ee67a.json',
).then((d) => d.json()),
]);
setData(joinData(geoData, ncovData.results));

View File

@ -82,7 +82,7 @@ const World = React.memo(function Map() {
).then((d) => d.json()),
// https://lab.isaaclin.cn/nCoV/api/area?latest=1
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0676f102-22f6-4c75-ab12-1ae200834b1c.json',
'https://gw.alipayobjects.com/os/bmw-prod/55a7dd2e-3fb4-4442-8899-900bb03ee67a.json',
).then((d) => d.json()),
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/8990e8b4-c58e-419b-afb9-8ea3daff2dd1.json',

View File

@ -59,7 +59,6 @@ export default class InteractionService extends EventEmitter
private addEventListenerOnMap() {
const $containter = this.mapService.getMapContainer();
Hammer.defaults.domEvents = true;
if ($containter) {
const hammertime = new Hammer.Manager($containter);
hammertime.add(

View File

@ -73,9 +73,8 @@ export default class MarkerComponent extends React.Component {
scene.on('loaded', () => {
// @ts-ignore
marker.on('click', (e) => {
console.log(this.scene.getZoom());
});
// marker.on('click', (e) => {
// });
// const marker1 = new AMap.Marker({
// map: scene.map,
// position: [120.184824, 30.248341],