I'm wondering how to make the graphic follow the cursor as I drag it.
In Javascript v3 I've done following:
this.map.on('mouse-drag-start', e=>{this.map.disablePan()this.startedMoving = true})
this.map.on('mouse-drag', e=>{if (!this.startedMoving) returnthis.graphic.setGeometry(new Point(e.mapPoint.x, e.mapPoint.y, spatialReference))})
this.map.on('mouse-drag-end', e=>{this.map.enablePan()
})
Thanks for your reply.I use (ArcJSAPI 4.4), which is Extent(new Extent(( xmin, xmax, ymin, ymax, spatialReference: xyz));) instead of Point.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.