You need to sign in to do that
Don't have an account?
Changing size of embedded SWF in a VF page
I've got a SWF that's embedded in a VF page. I've set the layout that houses the VF page to be a one-column layout and the page has nothing but the swf embedded in it. the swf itself has only a form wrapper around the google map. Why doesn't the Map extend the width of the screen?
<apex:page standardController="Location__c" extensions="GoogleMapManager">
<apex:flash id="flexSOs" src="{!$Resource.FlexGoogleMap}"
height="100%" width="100%"
flashvars="session_id={!$Api.Session_ID}&server_url={!$Api.Partner_Server_URL_150}&aLoc={!latitude}&zLoc={!longitude}"/>
</apex:page>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="init();"
width="100%"
height="100%"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.overlays.Marker;
import com.google.maps.MapMouseEvent;
import mx.collections.ArrayCollection;
import com.google.maps.controls.ScaleControl;
import com.google.maps.controls.ZoomControl;
import com.google.maps.controls.MapTypeControl;
[Bindable]
public var locations:ArrayCollection = new ArrayCollection();
public function init():void{
Security.allowInsecureDomain("maps.googleapis.com");
}
private function onMapReady(event:MapEvent):void {
var lat:Number = parseFloat(parameters.aLoc);
var lon:Number = parseFloat(parameters.zLoc);
var latLng:LatLng = new LatLng(lat, lon);
var marker:Marker = new Marker(latLng);
map.setCenter(latLng, 17, MapType.NORMAL_MAP_TYPE);
map.addOverlay(marker);
map.addControl(new ScaleControl());
map.addControl(new ZoomControl());
map.addControl(new MapTypeControl());
}
]]>
</mx:Script>
<mx:Form
width="100%" height="100%"
borderStyle="solid" borderColor="#D4D4D4"
dropShadowEnabled="true" dropShadowColor="#B3B3B3"
shadowDirection="right" shadowDistance="10">
<maps:Map xmlns:maps="com.google.maps.*" mapevent_mapready="onMapReady(event)" id="map"
key="ABQIAAAAA7aFgeQgFpt9KTUNsnsLOxS_OfvXuFpkKLqWEAhV7rt46ELgZhQqmfKMyH0V6D-GCiomYQVTAEWYSQ"/>
</mx:Form>
</mx:Application>
All Answers