11
Apr
07

Resizing the Map by dragging the container

I got the question again from Girish :) He was trying to resize the map whenever you try to  change the size of the vdividedbox component.

Here is the link –>

http://digitallyinsane.wordpress.com/2007/04/05/show-the-marker-on-the-map-on-the-click-on-the-map/

I tried to digg in to the problem and found out that if u want to change the size of the map on resizing the container you need to provide the min width and min height in the source provided by yahoo

Check out this article in Flex docs

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00001733.html 

Its saying about setting the minimum height and width of the component and my guess is that u have to set that in the  YahooMapService.as file.

I am trying to look into that but busy with some other work.

Here is one more alternative that can be done

Instead of putting a container inside the vdividedbox and putting a map inside it, put map directly inside the vdividedbox and set the width and height of the yahoo map component as 80% and you will be able to resize it. ;)

Here is the code

<mx:VDividedBox id=”vdb” right=”5″ top=”5″ bottom=”5″ left=”285″ >

<yahoo:YahooMapService
id=”myAS2Map”
UUID=”12345″
swfDomId=”{SWFDOMID}”
apiId=”{YAHOOAPIKEY}”
mapURL = “{MAPSWF}” height=”80%” width=”80%”
x=”10″ y=”10″/>

<mx:Canvas height=”100%” width=”100%” >
<mx:Label
text=”Add Components here”
fontWeight=”bold”/>
</mx:Canvas>
</mx:VDividedBox>

I hope this helps.

If there is anything else do write it to me.

Cheers!

Anupam

About these ads

1 Response to “Resizing the Map by dragging the container”


  1. 1 Idetrorce
    December 15, 2007 at 6:37 pm

    very interesting, but I don’t agree with you
    Idetrorce


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Its Me

April 2007
M T W T F S S
« Mar   Jun »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Categories

Blog Stats

  • 10,243 hits

My Links

Amazon Wish List

My Amazon.com Wish List

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: