Hi Ben Assuming that in your example this.myImage is a reference to a bitmap image which has been added as a child of your overlay that should work fine.
If in doubt, you can always add a marker at the same lat/long coordinate to verify the image's position relative to the coordinate. Cheers Adam On Dec 24, 10:57 am, Benji <[email protected]> wrote: > Adam > > Thanks for the insight! > > From what I understand the fromLattLngToPaneCoords() method takes a > LatLng object and returns a point. And This point is a representation > of the latlng location on the coordinate system? > > For example: > > public override positionOverlay(zoom:Boolean):void > { > var myPoint:Point = this.pane.fromLatLngToPaneCoords(new LatLng(10, > 10)); > this.myImage.x = point.x; > this.myImage.y = point.y; > > } > > Now every time the position is changed, the variable point is created > to and will be different. But everytime it is a point that corresponds > to the lat/long 10, 10? And by setting x and y propeties of my image > to this point, my image will align its NE corner to this point? > > This correlation is where I am confused:) > > Any clarification in this regard would be swell! > > Again thanks for your help! > Ben > > On Dec 23, 12:40 pm, Adam Ratcliffe <[email protected]> wrote: > > > Hi Ben > > > The positionOverlay() method is called whenever the center of the map > > or its zoom level is changed. In your implementation of this method > > you should reposition your custom overlay, calculating a new position > > for it based upon the current map state. To do this you need to map > > the overlay's geographic coordinates to values within the owning > > pane's coordinate system. > > > When your overlay is added to the map it's pane property is > > initialized with the pane the overlay has been added to and you use > > this reference to perform the translation using the > > fromLatLngToPaneCoords() method. The method is documented > > here:http://code.google.com/apis/maps/documentation/flash/reference.html#I... > > > For a working example take a look at the custom tooltip demo > > here:http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/TooltipOver... > > > If you View Source on the example the custom overlay is implemented by > > the com.google.maps.examples.TooltipOverlay class. > > > Cheers > > Adam > > > On Dec 23, 11:58 am, Benji <[email protected]> wrote: > > > > Would anyone like to provide a little more depth to the method > > > positionOverlay of the OverlayBase class? > > > > I have an image I wish to overlay, but do not understand how to > > > position the image relative to the map. > > > > Thanks in Advance! > > > Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
