You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
A projection is used to translate between on screen location and geographic coordinates on the surface of the Earth (LatLng). Screen location is in screen pixels (not display pixels) with respect to the top left corner of the map (and not necessarily of the whole screen).
VisibleRegion:
Contains the four points defining the four-sided polygon that is visible in a map's camera. This polygon can be a trapezoid instead of a rectangle, because a camera can have tilt. If the camera is directly over the center of the camera, the shape is rectangular, but if the camera is tilted, the shape will appear to be a trapezoid whose smallest side is closest to the point of view.
While implementing this, I'm not sure why there is a separate class for VisibleRegion instead of using LatLngBounds instead.. As long as I don't see a need for this I'm going to implement that method with following signature: LatLngBounds getVisibleRegion()
There is actually no way of writing unit tests for these except for a sanity check, this is because all 3 methods from Projection are using the underlying native library.
Damn it, shooting myself in the foot here with Remove BoundingBox class,
I will have to update jni.cpp and update related methods to us LatLngBounds instead.
Activity
tobrun commentedon Jan 29, 2016
Projection:
VisibleRegion:
tobrun commentedon Feb 3, 2016
While implementing this, I'm not sure why there is a separate class for VisibleRegion instead of using LatLngBounds instead.. As long as I don't see a need for this I'm going to implement that method with following signature:
LatLngBounds getVisibleRegion()tobrun commentedon Feb 3, 2016
There is actually no way of writing unit tests for these except for a sanity check, this is because all 3 methods from Projection are using the underlying native library.
[android] #3758 - Projection / Visible Region implementation.
jfirebaugh commentedon Feb 3, 2016
Rotation and tilt?
LatLngBoundsis axis aligned and rectangular; the region visible in a viewport is not necessarily so.tobrun commentedon Feb 3, 2016
@jfirebaugh Yes, that makes a lot of sense! will add that
tobrun commentedon Feb 4, 2016
Today I will add
VisibleRegionbut will do a cleanup of the old geometry classes as well.tobrun commentedon Feb 4, 2016
Damn it, shooting myself in the foot here with
Remove BoundingBoxclass,I will have to update
jni.cppand update related methods to usLatLngBoundsinstead.