I know about union method, but it is not working as expected. Here is
snippet of my code:
var polygons:CountryPolygons = new CountryPolygons();
var visitedArea:LatLngBounds;
var p1:Polygon =
polygons.getCountryData("CZE").getPolygon();
visitedArea = p1.getLatLngBounds();
_map.addOverlay(p1);
var p2:Polygon =
polygons.getCountryData("FIN").getPolygon();
visitedArea.union(p2.getLatLngBounds());
_map.addOverlay(p2);
_map.setCenter(visitedArea.getCenter(),
_map.getBoundsZoomLevel
(visitedArea), _map.getCurrentMapType());
It creates two polygons (based on encoded borders data of Czech
Republic and Finlad). But result is, that not whole polygons are
focused...
On Jun 2, 7:11 pm, Aaron Donohue <[email protected]> wrote:
> LatLngBounds has a union method that should allow you to accomplish
> your
> goal...http://code.google.com/apis/maps/documentation/flash/reference.html#L...
>
> Hope that helps:)
>
> Aaron Donohue
>
> On Jun 2, 10:58 am, PetrKaleta <[email protected]> wrote:
>
>
>
> > LatLngBounds.extend can take just LatLng parameter, there is no option
> > to extend LatLngBounds by another LatLngBounds. Or am I missing
> > something?
>
> > On Jun 2, 6:54 pm, PetrKaleta <[email protected]> wrote:
>
> > > Hi I am working with encoded polygons and polylines. Is there any way
> > > to calculate LatLngBounds of all polygons & polylines = zoom to fit
> > > all of them.
>
> > > TY
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---