mirror of https://gitee.com/antv-l7/antv-l7
fix: marker event
This commit is contained in:
parent
5421f874b5
commit
ce6eefdeb8
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in New Issue