New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/#990 - step 1 - Overlay.draw(Canvas, Projection) #1245

Merged
merged 1 commit into from Jan 6, 2019

Conversation

Projects
None yet
2 participants
@monsieurtanuki
Copy link
Collaborator

monsieurtanuki commented Jan 5, 2019

Note: All tests are welcomed: do you still see your Overlays without any problem?

Created method Overlay.draw(Canvas, Projection), to be used and overridden rather than the now deprecated method draw(Canvas, MapView, boolean).

Impacted interface:

  • OverlayManager: created method onDraw(Canvas, Projection), to be used and overridden rather than the now deprecated method onDraw(Canvas, MapView)

Impacted classes:

  • Overlay: created method draw(Canvas, Projection), to be used and overridden rather than the now deprecated method draw(Canvas, MapView, boolean); gently refactored

  • Projection: added getters isHorizontalWrapEnabled, isVerticalWrapEnabled and getOrientation

  • CirclePlottingOverlay: removed useless overridden code of draw(Canvas, MapView, boolean) as there's no display

  • IconPlottingOverlay: removed useless overridden code of draw(Canvas, MapView, boolean) as there's no display

  • MapEventsOverlay: removed useless overridden code of draw(Canvas, MapView, boolean) as there's no display

  • MilStdPointPlottingOverlay: removed useless overridden code of draw(Canvas, MapView, boolean) as there's no display

  • RotationGestureOverlay: removed useless overridden code of draw(Canvas, MapView, boolean) as there's no display

  • Bug82WinDeath: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • CompassOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • CopyrightOverlay: added field mCopyrightNotice and its setter; moved most of the code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • DirectedLocationOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • FolderOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • GroundOverlay2: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • IconOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • ItemizedOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection); replaced parameter MapView with Projection in method onDrawItem(Canvas, Item, Point, MapView)

  • ItemizedOverlayWithFocus: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • Marker: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • MinimapOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection); replaced method setViewPort(Canvas, MapView) with setViewPort(Canvas, Projection)

  • MyLocationNewOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection); replaced method drawMyLocation(Canvas, MapView, Location) with drawMyLocation(Canvas, Projection, Location)

  • PathOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • Polygon: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • Polyline: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • SampleTileStates: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • ScaleBarOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • SimpleLocationOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection)

  • TilesOverlay: moved code from draw(Canvas, MapView, boolean) to draw(Canvas, Projection); replaced method protectDisplayedTilesForCache(Canvas, MapView) with protectDisplayedTilesForCache(Canvas, Projection); replaced method setViewPort(Canvas, MapView) with setViewPort(Canvas, Projection); OverlayTileLooper; unrelated little optimization in method onTileReadyToDraw

  • DefaultOverlayManager: moved code from onDraw(Canvas, MapView) to new method onDraw(Canvas, Projection)

  • LinearRing: remplace method setClipArea(MapView) with setClipArea(Projection)

feature/#990 - step 1 - Overlay.draw(Canvas, Projection)
Created method `Overlay.draw(Canvas, Projection)`, to be used and overridden rather than the now deprecated method `draw(Canvas, MapView, boolean)`.

Impacted interface:
* `OverlayManager`: created method `onDraw(Canvas, Projection)`, to be used and overridden rather than the now deprecated method `onDraw(Canvas, MapView)`

Impacted classes:
* `Overlay`: created method `draw(Canvas, Projection)`, to be used and overridden rather than the now deprecated method `draw(Canvas, MapView, boolean)`; gently refactored
* `Projection`: added getters `isHorizontalWrapEnabled`, `isVerticalWrapEnabled` and `getOrientation`

* `CirclePlottingOverlay`: removed useless overridden code of `draw(Canvas, MapView, boolean)` as there's no display
* `IconPlottingOverlay`: removed useless overridden code of `draw(Canvas, MapView, boolean)` as there's no display
* `MapEventsOverlay`: removed useless overridden code of `draw(Canvas, MapView, boolean)` as there's no display
* `MilStdPointPlottingOverlay`: removed useless overridden code of `draw(Canvas, MapView, boolean)` as there's no display
* `RotationGestureOverlay`: removed useless overridden code of `draw(Canvas, MapView, boolean)` as there's no display

* `Bug82WinDeath`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `CompassOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `CopyrightOverlay`: added field `mCopyrightNotice` and its setter; moved most of the code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `DirectedLocationOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `FolderOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `GroundOverlay2`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `IconOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `ItemizedOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`; replaced parameter `MapView` with `Projection` in method `onDrawItem(Canvas, Item, Point, MapView)`
* `ItemizedOverlayWithFocus`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `Marker`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `MinimapOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`; replaced method `setViewPort(Canvas, MapView)` with `setViewPort(Canvas, Projection)`
* `MyLocationNewOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`; replaced method `drawMyLocation(Canvas, MapView, Location)` with `drawMyLocation(Canvas, Projection, Location)`
* `PathOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `Polygon`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `Polyline`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `SampleTileStates`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `ScaleBarOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `SimpleLocationOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`
* `TilesOverlay`: moved code from `draw(Canvas, MapView, boolean)` to `draw(Canvas, Projection)`; replaced method `protectDisplayedTilesForCache(Canvas, MapView)` with `protectDisplayedTilesForCache(Canvas, Projection)`; replaced method `setViewPort(Canvas, MapView)` with `setViewPort(Canvas, Projection)`; `OverlayTileLooper`; unrelated little optimization in method `onTileReadyToDraw`

* `DefaultOverlayManager`: moved code from `onDraw(Canvas, MapView)` to new method `onDraw(Canvas, Projection)`
* `LinearRing`: remplace method `setClipArea(MapView)` with `setClipArea(Projection)`

@monsieurtanuki monsieurtanuki requested a review from spyhunter99 Jan 5, 2019

@spyhunter99

This comment has been minimized.

Copy link
Collaborator

spyhunter99 commented Jan 5, 2019

looks ok to me

@monsieurtanuki monsieurtanuki merged commit 4730465 into master Jan 6, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@monsieurtanuki

This comment has been minimized.

Copy link
Collaborator

monsieurtanuki commented Jan 6, 2019

The sooner it's merged, the sooner possible side effects are found.
But #990 is not over yet.

@monsieurtanuki monsieurtanuki referenced this pull request Jan 6, 2019

Open

MapView "lite mode" as in Google Maps #990

1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment