Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps Flash API Custom Content Problem
    text
    copied!<p>I am creating a little map app where you are given information, video and images regarding different campuses in a university.</p> <p>I am using the customContent method to insert video player object into the infoWindow but when I do this it gets rid of my text content and becomes the only visible thing to the user.</p> <p>How Can I work around this and have both text and video in the infoWindow?</p> <p><a href="http://xgreen.co.uk/maps/bin-debug/googlemapsdemo.html" rel="nofollow">Demo link</a></p> <pre><code>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); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload