Bonjour à tous,

Ok c'est totalement abscons et j'en suis désolé. Mais le truc est le suivant:

J'ai dans ma forme "Formulaire" , un onglet dont l'une des pages affiche une Google Maps.
On ne se décourage pas...
Au marker positionné sur la Google Maps, est attachée une infoWindow composée d'un onglet. Sur le deuxième onglet, j'affiche la strretView correspondante au LatLong du marker. Enfin j'essaye car c'est là que commence mon problème!

Mon code sous ready(function) est :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$(document).ready(function()
	$("#idTab").tabs();
	$("#idTab").tabs({
		activate: function(event, ui){	GoogleMap();}	
	});
 
function GoogleMap() 
{	var oDataSQL =  ajaxXHR("setInfo"); 
	var name  = oDataSQL[0]["NAME"];
	var latitude  = parseFloat(oDataSQL[0]["LATITUDE"]);
	var longitude  = parseFloat(oDataSQL[0]["LONGITUDE"]);
	var id  = "GoogleMaps";
 
	var latlngMarker = new google.maps.LatLng(latitude, longitude);
 
	var mapOptions = 
	{	zoom: 12,
		center: latlngMarker,
		mapTypeId: google.maps.MapTypeId.ROADMAP, // Existe d'autre format Ex: HYBRID => Plan sur photo
		scalecontrol: true,
		navigationControl: true,
		maxZoom : 20,
		navigationControlOptions:{style: google.maps.NavigationControlStyle.SMALL},
		mapTypeControlOptions:{style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
		streetViewControl: true
	};	
 
	var mapID = document.getElementById(id);
	var map = new google.maps.Map(mapID, mapOptions);   
 
	var markerOpts =	
	{	position: latlngMarker,
		map:map,
		title: name
	};
 
	var marker = new google.maps.Marker(markerOpts);
 
	var contentInfoWin =
	[	'<div id="infoWin">',
			'<div class ="tabs">',
				'<ul>',
					'<li><a href="#tab1">Infos</a></li>',
					 '<li><a href="#tab2" id="SV">Street View</a></li>',
				'</ul>',
				'<div id="tab1">' + name + '</div>',
				'<div id="tab2">',
					'<div id="pano"></div>',
				'</div>',
			'</div>',
		'</div>'
	].join('');
 
	var InfoWinOpts = 
	{	content  : contentInfoWin,
		position : latlngMarker
	};
 
	var infoWin = new google.maps.InfoWindow(InfoWinOpts);
	google.maps.event.addListener(marker, 'click', function()
	{	infoWin.open(map,marker);
	});
 
	var panoOpts = {position: marker.position};
	google.maps.event.addListener(infoWin, 'domready', function()
	{	$(".tabs").tabs();
		$('#SV').click(function()
			{	var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"),panoOpts);  
				map.setStreetView(panorama);
			});
	});
C'est ce bout de code qui résiste :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
	var panoOpts = {position: marker.position};
	google.maps.event.addListener(infoWin, 'domready', function()
	{	$(".tabs").tabs();
		$('#SV').click(function()
			{	var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"),panoOpts);  
				map.setStreetView(panorama);
			});
Alors j'ai essayé avec ça mais le patient ne réagit pas plus!

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
var panoOpts = {position: marker.position};
	google.maps.event.addListener(infoWin, 'domready', function()
	{	$(".tabs").tabs();
		$("#SV").tabs({
		activate: function(event, ui)
		{	var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"),panoOpts);  
			map.setStreetView(panorama);
		}	
	});
Il y a open web code ici après avoir validé l'accès

Toute aide est la bienvenue. Merci !


Be seeing you Nom : prisoner_number_6_button_be_seeing_you_Xsmall.jpg
Affichages : 150
Taille : 1,9 Ko