i can't solve the problem :(

The code for the move_end command... how can i set the right
centerpoint? I'm on then wrong path?

private function handleMoveEnd(evt:MapMoveEvent):void
                {
                        if(this._maxMapBounds != null) {
                                trace("handleMoveEnd() ---------------");

                                var currLatLngBounds:LatLngBounds = 
this.getLatLngBounds();
                                var outOfBounds:Boolean = false;

                                var south:Number = currLatLngBounds.getSouth();
                                var north:Number = currLatLngBounds.getNorth();
                                var east:Number = currLatLngBounds.getEast();
                                var west:Number = currLatLngBounds.getWest();

                                if(currLatLngBounds.getSouth() < 
this._maxMapBounds.getSouth()){
                                        trace("south out of bounds");
                                        trace( currLatLngBounds.getSouth() +" "+
this._maxMapBounds.getSouth() );

                                        south = this._maxMapBounds.getSouth();
                                        outOfBounds = true;
                                }
                                if(this.getLatLngBounds().getNorth() >
this._maxMapBounds.getNorth()){
                                        trace("north out of bounds");
                                        trace( currLatLngBounds.getNorth() +" "+
this._maxMapBounds.getNorth() );

                                        north = this._maxMapBounds.getNorth();
                                        outOfBounds = true;
                                }
                                if(this.getLatLngBounds().getEast() > 
this._maxMapBounds.getEast())
{
                                        trace("east out of bounds");
                                        trace( currLatLngBounds.getEast() +" "+
this._maxMapBounds.getEast() );

                                        east =  this._maxMapBounds.getEast();
                                        outOfBounds = true;
                                }
                                if(this.getLatLngBounds().getWest() < 
this._maxMapBounds.getWest())
{
                                        trace("west out of bounds");
                                        trace( currLatLngBounds.getWest() +" "+
this._maxMapBounds.getWest() );

                                        west =  this._maxMapBounds.getWest();
                                        outOfBounds = true;
                                }

                                if(outOfBounds == true){
                                        nLatLngBounds = new LatLngBounds(new 
LatLng(south,west), new
LatLng(north,east));
                                        callLater(doPos);
                                }
                        }
                }

                private function doPos():void{
                        trace("one two");
                        this.setCenter(nLatLngBounds.getCenter());
                }

--~--~---------~--~----~------------~-------~--~----~
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