> If there are points (e.g southpoint, westpoint, northpoint,
> eastpoint), is it possible to make those points as the map's bounds?

In most cases, no.

Firstly the set of four points would have to lie at the corners of a
rectangle that would happen to exactly fit the maps projection of
something that _looked_ like a rectangle onscreen.   Bear in mind on
most real world maps, there is distortion from projection.   Fpr
example, the distance represented from corner to corner at the top of
the map isn't the same as the distance represented at the bottom for
example, even though the pixel count is the same.

It depends on the source of your points, but most likely the best you
can do is work to MBR - Minumum Bounding Rectangle - that includes
these four points.

Next problem is that the map only comes in integer zoom levels.  For a
fixed pixel size map, a map that includes your MBR will most likely be
bigger than the MBR.

> Then I would like to obtain a proper size of map in pixel.

One approach might be to make an invisible map at the maximum pixel
size you can allow.  Then centre and zoom that to your MBR using the
API's bounds methods.  Then calculate the length of the sides of your
MBR as it would be displayed there in pixels.  Then use those pixels
to size the map, keeping the centre and zoom.  Finally reveal the map.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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?hl=en.

Reply via email to