Select to view content in your preferred language

Binding DOM Elements to Graphics Instead of SimpleMarkerSymbol() in ArcGIS API For JS

2175
0
08-26-2015 11:28 AM
BruceGreen
Occasional Contributor

Can you please 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 this

var point = new Point(-126.687482, 54.793577); 
var pointSymbol = '<div class="marker"></div>'; 

but it is not doing the job! here is the whole code

ar 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);
  }
});
Tags (1)
0 Kudos
0 Replies