AnsweredAssumed Answered

Create a custom dojo class for map click

Question asked by yanasdf789 on Dec 11, 2018
Latest reply on Dec 11, 2018 by rscheitlin

I want to  create  a  dojo  class  for  map click event


define(["dojo/_base/declare","dojo/request/script","dojo/json","dojo/dom"],function(declare,script,JSON,dom){ return declare(null, { map: null, Name:null, view:null, constructor: function(mMap,name,mView){ map=mMap; view=mView; }, getLocation: function(event){ var x=event.mapPoint.x; var y=event.mapPoint.y; console.log(; //undefined // i can't get the calss's property!!!!! } Dojob:function() { this.view.on("click",getLocation); } }) })


in  the  callback function  ,i can't  get  the class property,how to do?