Hi,
i'm running into a bit of strange issue and i can't find someone with
the same problem (even if it is pretty easy to reproduce). In my
application (Flex), the map is resized when his container is resized
so that it fits. But when i use the getPrintableBitmap() method on the
Map Object, it returns a Bitmap with the Map's init size. And
actually, the getSize() method also returns wrong results.
Here is a quick application to show the problem:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
horizontalCenter="0" verticalCenter="0"
                xmlns:local="*" xmlns:maps="com.google.maps.*">
  <mx:Script>
    <![CDATA[
      private function onMapReady():void {
        trace("1: " + map.getSize());
        trace("1: " + map.width);
        map.setSize(new Point(500, 500));
        trace("2: " + map.getSize());
        trace("2: " + map.width);
        map.width = 600;
        map.height = 600;
        trace("3: " + map.getSize());
        trace("3: " + map.width);
      }
    ]]>
  </mx:Script>
  <maps:Map id="map" width="400" height="400"
mapevent_mapready="onMapReady()"
            key="ABQIAAAA5oy7BOLSV2Fc9rlLk28UhxSdNaHom14quJAXG-
RpBQtmxA9jBBRI266aXtlHfds0vg1hrhkhYPZn1A" />
</mx:Application>
This will trace:
1: (x=400, y=400)
1: 400
2: (x=400, y=400)
2: 500
3: (x=400, y=400)
3: 600
As you can notice, the getSize() method always return the same values
(init ones), but the width/height of the Map component are correct.
This will lead the getPrintableBitmap() to produced an image with an
offset, not representative of the map i have on my screen.
Any help would be appreciated :)
Thanks,
Fabien

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en.

Reply via email to