-
Notifications
You must be signed in to change notification settings - Fork 986
-
Notifications
You must be signed in to change notification settings - Fork 986
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
MapView "lite mode" as in Google Maps #990
Comments
i feel like this was requested before. Someone had asked for a mechanism to fetch a specific tile from the cache, would that satisfy this need? |
@spyhunter99 Rather than just a tile fetch, it's more like "I would like to put And with a nice demo! I'm currently building another demo with all US states and gathered their geo bounding boxes. |
I'd use it for thumbnails of locations in #719. Right now I have bitmap but it is a bit off (just part of a point is displayed i.e. just the tile containing the point, not the neighboring tile). |
A problem might be to know when a
For the record, when I exported a |
Working on it... |
Knowing when all the needed tiles are available is not an issue, a simple loop is enough. I managed to export a large png from a geo area, but only the tiles. Now the problem is: should I create a dummy The problem is that |
Working again on the subject. A way to include all kinds of @spyhunter99 While I'm creating |
@spyhunter99 Forget it, I'll make it more frictionless by creating both public void draw(final Canvas pCanvas, final MapView pMapView, final boolean pShadow) {
if (pShadow) {
return;
}
draw(pCanvas, pMapView.getProjection());
}
public void draw(final Canvas pCanvas, final Projection pProjection, final boolean pShadow) {
if (pShadow) {
return;
}
draw(pCanvas, pProjection);
}
public void draw(final Canvas c, final Projection pProjection) {} The (reachable?) goal being for classes extending |
A good compromise for removing the method with the |
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)
Step 1 was #1245 - merged. |
Currently working on step 2. The goal is to put map snapshots in a |
Done. I've just PR'ed #1277. |
Done in #1277. Closed. |
Hello, I did not understand how to use this :( How can I turn on lite mode? |
@s-ilnar As stated in #1277, try to find inspiration in |
@monsieurtanuki Thank you! |
Issue Type
Description and/or steps/code to reproduce the problem
As mentioned by @AbduazizKayumov in #958, it would be nice to have a lite mode in
MapView
, similar to GoogleMaps':The text was updated successfully, but these errors were encountered: