PDA

View Full Version : hide marker by id



sedoyksa
17 Nov 2011, 9:46 PM
hi
here http://suprofitweb.ru/google/map.php i have code\map
how can i call marker for hide it?
for example: markers: [{ lat: 42.339641,
lng: -71.094224,

marker: {title: 'Boston Museum of Fine Arts',draggable:true,id:'mark',
name:'mark'},
listeners: {
click: function(e) {
var el = this.getMarkerById('mark');
el.hide=true;
Ext.Msg.alert(Ext.getVersion().toString());
so i have only alert. cant hide marker

i need to hide marker
how??

i use framework 4.0.0.

mitchellsimoens
18 Nov 2011, 2:22 PM
This actually has nothing to do with Ext JS but everything to do with Google Maps. You have to get the marker instance and do a setMap(null) to remove the marker from the map.

sedoyksa
18 Nov 2011, 2:24 PM
have you example?
i dont know code