salve a tutti
il seguente codice mi permette di creare una linea su una mappa partendo da un file gps
//////////////////////////////////////////////////////////////////////////////////
$.ajax({
type: "GET",
url: "gpx/mattiaromaremtb0001.gpx",
dataType: "xml",
success: function(xml) {
var points = [];
var bounds = new google.maps.LatLngBounds ();
$(xml).find("trkpt").each(function() {
var lat = $(this).attr("lat");
var lon = $(this).attr("lon");
var p = new google.maps.LatLng(lat, lon);
points.push(p);
bounds.extend(p);
});
var poly = new google.maps.Polyline({
// use your own style here
path: points,
strokeColor: "#0000ff",
strokeOpacity: .6,
zindex:0,
strokeWeight: 5
});
poly.setMap(map);
var infowindow0001 = new google.maps.InfoWindow({ disableAutoPan: false});
var contentString0001 =''+'SCHEDA TECNICA'+'';
google.maps.event.addListener(poly, 'click', function(event) {
infowindow0001.setContent(contentString0001);
infowindow0001.position = event.latLng;
infowindow0001.open(map);
});
google.maps.event.addListener(map, 'click', function() {
infowindow0001.close();
});
google.maps.event.addListener(poly,"mouseover",fun ction(){ poly.setOptions({strokeWeight:
7,zindex:5000,strokeColor:"#0000ff", strokeOpacity: 1.0});});
google.maps.event.addListener(poly,"mouseout",func tion(){ poly.setOptions({strokeWeight:
5,zindex:0,strokeColor:"#0000ff", strokeOpacity: .6});});
}
});
//////////////////////////////////////////////////////////////////////////////
voglio modificare il seguente pezzo di codice
/////////////////////////////////////////////////////////////////////////////
var infowindow0001 = new google.maps.InfoWindow({ disableAutoPan: false});
var contentString0001 =''+'SCHEDA TECNICA'+'';
google.maps.event.addListener(poly, 'click', function(event) {
infowindow0001.setContent(contentString0001);
infowindow0001.position = event.latLng;
infowindow0001.open(map);
});
/////////////////////////////////////////////////////////////////////////////
attualmente
se clicco poly mi apre una infowindow (il classico fumetto di gooogle maps) in cui compare un link (SCHEDA TECNICA) che se cliccato si apre nel frame specifico (iframe_video)
come posso fare per eliminare il passaggio della infowindow cioè
vorrei che quando clicco l'oggetto poly il link si aprisse subito nello specifico iframe.