Query: How to change marker symbol dynamically programatically on graphics layer
Hi Robert Scheitlin, GISP
I am changing marker symbol url here
//This is tempgraphics function
markerGL.add(cloneGra); point_url = cloneGra.symbol.__accessor__.store._values; }//End If }//End addTempGraphics
//On button save click
point_url = cloneGra.symbol.__accessor__.store._values;
var tempoint = changedMarkerSymbol(markertype);//passing type of marker to this function and it return new symbol url point_url.url = tempoint;//tempoint contain new url
Rajni,
The simple solution is to remove that graphic and re-add it with the new symbology.
Hi after so many efforts my markersymbol changed but it only changed when i zoom in or out map after that. i called my event in view.when and in require function but it do not change instantly.
Is their any other way to do it.
Thanks in advance, this is my code below
//save marker button jQuery('#main').on('click','.savemarker',function(e){ var points_arr=[]; var markertype = jQuery(this).parents().find('.dropdownbtn').html(); var comment = jQuery(this).parents().find('.write_comment').val(); var tempoint = changedMarkerSymbol(markertype);//passing type of marker to this function point_url.url = tempoint;//tempoint contain new url points_arr={'x' : point_x_coordinate , 'y' : point_y_coordinate}; jQuery.ajax({ //send ajax call to save data success: function(data){ } });
view.popup.close();
});//End Save marker
Hi I tried to change it by accessing its url.
point_url = cloneGra.symbol.__accessor__.store._values.url;
and tried to change the symbol point_url in l while saving that marker, but it do not change.????
Do anyone know how to change symbol of individual marker
1 when we click on that marker,
2 define a marker type in textbox save it and
3 change its symbol.
var pointurl = funurl(mtype); point_url.url = pointurl;
console.log(point_url.url);
It return perfect url but do not chnge marker symbol instantly i have to zoom in or zoomout that map then the markers change???
Plus when i again change the same marker it do not chnage symbol
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.