Topic: Let Map contains all Drawing element
Hi, I am working on adding some lines on OnlineMapsTileset.
This time I want to see the whole drawing element( ie. PolyLine, ... ) that Map focus.
Like Google Maps Api V3 's fitbounds(), but somehow OnlineMaps.instance.positionRange not do that tricks.
As a result, I run through all points in PolyLine and generate a Bounding Box ( bound by lat, lng ).
If I get the best fit zoom, I will solve this problem as I can setPositionAndZoom by center of BoundingBox and b-f zoom.
So, the question is, if there is a solution to let map focus on specific area(latlng bound)?
if not, how can I get best fit zoom by bounding box?
thanks a lot!!!!