0

Can you let me know if it is possible to bind our custom DOM into the geometry point instead of ArcGIS API SimpleMarkerSymbol()?

I tried to do this like below but it is not doing the job!

var point = new Point(-126.687482, 54.793577); 
var pointSymbol = '<div class="marker"></div>'; 
var pointAttributes = {city: "Albuquerque",  state: "New Mexico"};
var pointInfoTemplate = new InfoTemplate("Albuquerque"); 
var pointGraphic = new Graphic(point, pointSymbol, pointAttributes).setInfoTemplate(pointInfoTemplate);
    thePoints.push(pointGraphic);
        console.log(thePoints)
map.on('load', function () {
        for (i = 0; i < thePoints.length; ++i) {
        map.graphics.add(thePoints[i]);
    }
});
1

No, the Graphic() doesn't work that way. The second parameter needs to be a subclass of https://developers.arcgis.com/javascript/jsapi/symbol-amd.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.