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.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.