Je suis en train de créer une petite application cartographique où l'on vous donne des informations, des vidéos et des images concernant différents campus dans une université. J'utilise la méthode customContent pour insérer un objet lecteur vidéo dans infoWindow, mais quand je le fais, il se débarrasse de mon contenu textuel et devient la seule chose visible pour l'utilisateur.Google Maps Flash API Problème de contenu personnalisé
Comment puis-je contourner ce problème et avoir du texte et de la vidéo dans infoWindow?
public function createMarker(latlng:LatLng, name:String, address:String, video:String):Marker
{
var marker:Marker=new Marker(latlng);
marker.addEventListener(MapMouseEvent.CLICK, function(e:MapMouseEvent):void
{
//marker.openInfoWindow(new InfoWindowOptions({contentHTML:html + moulVid}));
var infoWindow:InfoWindowOptions = new InfoWindowOptions();
infoWindow.title = name;
var videoPlayer:VideoPlayer = new VideoPlayer();
videoPlayer.source = '../assets/video/' + video.toLocaleLowerCase();
videoPlayer.autoPlay = false;
videoPlayer.alpha = 0.8;
titleFormat = new TextFormat();
titleFormat.font = "Arial";
titleFormat.size = 14;
titleFormat.bold = true;
contentFormat = new TextFormat();
contentFormat.font = "Arial";
contentFormat.size = 12;
infoWindow.drawDefaultFrame = true;
infoWindow.titleFormat = titleFormat;
if (video != "") {
infoWindow.customContent = videoPlayer;
infoWindow.height = 300;
}
infoWindow.width = 380;
infoWindow.content = address;
infoWindow.contentFormat = contentFormat;
infoWindow.padding = 10;
marker.openInfoWindow(infoWindow);
});
Merci beaucoup. Cela a résolu mon problème – XGreen