Hi.
I can't manage to open an infoWindow when i click a polyline....I used
the same approach as in
http://www.stuyvesantcove.org/benchmarking/BM_MI_County_GMap.html
but it wont open!
here is my code
function startLine(){
var newLine = new GPolyline([]);
map.addOverlay(newLine);
//newLine.enableEditing({onEvent: 'mouseover'});
newLine.disableEditing({onEvent: 'mouseout'});
newLine.enableDrawing({});
newLine.id = idCounter++;
newLine.name = '';
newLine.description = '';
newLine.edited = '1';
newLine.otherInfo = new Array();
newOverlayTable[newLine.id] = newLine;
GEvent.addListener(newLine, 'click', function() {
var tabs = [];
htmlTab1 =
'<div id=\'window_div1\' style=\'width:
300px; height:
300px; \'>'+
' <form id=\'window_form_tab1\'>'+
' <label>Tipo de
espaço</label>'+
' <select
id=\'spatial_object_type\' name=
\'spatial_object_type\'>'+
'
</select><br/>'+
' <label>Nome do
espaço</label><br/>'+
' <input
id=\'name_field\' name=\'name_field\' type=
\"text\" value='+newLine.name+'><br/>'+
'
<label>Descrição</label><br/>'+
' <textarea
id=\'description\' name=\'description\' rows=
\"10\" cols=\"23.5\">'+newLine.description+'</textarea><br/>'+
' </form>'+
' <a id=\'id\'
myID='+newLine.id+'></a>'+
'</div>';
tabs.push(new GInfoWindowTab('Básico', htmlTab1));
tabs.push(new GInfoWindowTab('Adicional', '<div id=
\'window_div2\'></div>'));
map.openInfoWindowTabsHtml(latlng, tabs);
});
GEvent.addListener(newPolygon, 'endline', function(){
});
GEvent.addListener(newPolygon, 'cancelline', function(){
map.removeOverlay(newLine);
});
GEvent.addListener(newLine,'click',function(point){
map.openInfoWindowHtml(point,'111');
});
}
thanks in advance
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.