I am using the archgis map and basemap street.1) Fist i click on the geosearch button and then show the search location when i click on the search location one function fire which is shown below:
function chooseAddr(latt,longt)
{ $('#linkid').attr('data-latt', ''); var combine=latt+','+longt; $('#linkid').attr('data-latt', combine); $('#linkid').click(); //abc(); }
This is written on index.html page and on js file
$("#linkid").on("click", function() {
alert('inside the abc');
var dataLatt = $('#linkid')=='undefined'||$('#linkid')==''?'0,0':$('#linkid').data('latt');
var splitdata = dataLatt.split(",");
var latt = splitdata[0];
var longt = splitdata[1];
addmarker(latt, longt);
//addmarker('28.833333', '76.666667');
});
function addmarker(latt, longtt) {
polygraphlayer.clear();
var pt1 = new Point(Number(longtt), Number(latt));
var markersymbol1 = new PictureMarkerSymbol('images/marker.png', 10, 15);
polygraphlayer.add( Graphic(pt1, markersymbol1));
//map.add(polygraphlayer);
//map.graphics.add(polygraphlayer);
}
Its show the marker first time next time when i click on the search with different lat, long marker is not shown with same functions