Getting distance(in kms) from map center to start/end position of map - Google Maps Javascript
问题 How can I get distance(in kms) from mapCenter() to start/end position of map using Google Maps Javascript ? Is there a way to do this? 回答1: You probably looking for a getBounds function: Returns the lat/lng bounds of the current viewport. If more than one copy of the world is visible, the bounds range in longitude from -180 to 180 degrees inclusive. If the map is not yet initialized (i.e. the mapType is still null), or center and zoom have not been set then the result is null or undefined.