Skip to content

Commit

Permalink
[Map25] direction arrows and activated building layer for online maps (
Browse files Browse the repository at this point in the history
…#375)

* Revert "removed scaled thumb image, it had the same size as the original thumb but this was not the reason to remove it, this image was NEVER disposed -> SWT was running very fast out of handles when moving the tour chart slider as this would create a new image for every new slider position, discovered this issue with SWT sleak"

This reverts commit d3e09e3.

* reverted 'reverted "removed scaled image"'

* Starting with upgrading VTM 0.15

many changes in Libs...
ItemizedLayer
Mutable marker

* before deactivating some red code

* ItemizedLayer<> removing <> for vtm 0.15

* reactivating changed mapbookmarklayer and

avoid nullpointer when photolist is empty

* photolayer modified to work with vtm 0.15

and avoiding nullpointer again. 1sr try was nor working.

* Photoscaled On/Off

* run save actions for modified files

* Debug off

* cleanup some codelines

* latest vtm 0.15 updates

* Map25: PhotoLayer-> Starting with Adjustable PhotoSize and save and
restore state

* Map25 Photoresize with working save and restore

need some cleanup

* resolving one confict

* resolving conflicts...

* solving more conflicts

* adjusted the copyright text, just have a diff.

* undoing modified save actions

* revert save actions

* starting with some javadoc...

setting image quality from thumb to HQ

* in the slideout the "_chkShowPhoto_Scaled" button was to much.

something is going wrong with git, that was the second time.

* revert to ImageQuality.THUMB

increased stepsize in slideout from 5 to 10

* README

* Use same wording for "create Tour marker"

was different in create marker from chart

the wording i copied from net/tourbook/map2/messages*.properties to
net/tourbook/messages*.properties for all languages.

* README

* starting track direction arrows in map25

* starting track direction arrows in map25

* removing test icon

* moving arrow shape logic to markertoolkit

* cleanup direction arrow

* UI for the new Track Direction Arrows

* shorten the text in the slideout, so the layout looks better

Readme Update.
Default the arrows are off now

* show PR numbers in readme

* small refactorings

* resolving conflicts

* smaller refactoring

* track arrows are per default off, so maps looks like before the update.

* trying to solve last conflicts

* default arrows off

* smaller refactoring

* still conflicts

* working on conflicts...

* refactoring again

* undo refactoring, gave me conflicts again...

* refactoring

* When starting MT the first time map25 uses the wrong default provider.

* cleanup map2525Providermanager

* Readme Update

* Slideout map25 tourtrack set stepsize from 0.1 to 0.5

when using:
_spinnerOutline_Width.setDigits(1)
_spinnerOutline_Width.setIncrement(5); // it means 0.5

adding some missing tooltips for opacity and direction arrows.

* Sliderpath ends round line map2

* Tourlayer also with round ends

only when not using direction arrows, not neccercary there.

* VTM 0.16

vtm 0.16 was released on 27.05.2021
commit e62e27cf224670d23454365ecf729738611dc115

* readme update

* map25: track with arrows was a bit thin.

* open direction arrows in 2.5d map, like in 2d map now

* savestate/restorestate for building and S3DB

Co-authored-by: top <top@MB14>
  • Loading branch information
telemaxx and top committed Aug 7, 2021
1 parent 0ae6a9a commit 8ca5e2e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bundles/net.tourbook/src/net/tourbook/map25/Map25App.java
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ private void setupMap_Layers() {
*/
// // Buildings or S3DB Block I
_layer_S3DB_Building = new S3DBLayer(mMap, _layer_BaseMap, true); //this is working with subtheme switching, but no online buildings anymore
_layer_Building = new BuildingLayer(mMap, _layer_BaseMap, false, false); // building is not working with online maps, so deactvated also the shadow
_layer_Building = new BuildingLayer(mMap, _layer_BaseMap, true, true); // building is not working with online maps, so deactvated also the shadow

if (_isOfflineMap) {
// // S3DB
Expand All @@ -1437,14 +1437,14 @@ private void setupMap_Layers() {
_layer_S3DB_Building.setColored(true);
debugPrint(" map25: " + "################ setupMap_Layers: adding S3DBlayer "); //$NON-NLS-1$ //$NON-NLS-2$
//_layer_BaseMap.setTheme(_mf_IRenderTheme); //again??
//layers.remove(_layer_Building);
layers.remove(_layer_Building);
layers.add(_layer_S3DB_Building);
} else {
// building

_layer_Building.setEnabled(true);
debugPrint(" map25: " + "################ setupMap_Layers:Building Layer "); //$NON-NLS-1$ //$NON-NLS-2$
//layers.remove(_layer_S3DB_Building);
layers.remove(_layer_S3DB_Building);
layers.add(_layer_Building);
}

Expand Down
3 changes: 2 additions & 1 deletion bundles/net.tourbook/src/net/tourbook/map25/Map25View.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import net.tourbook.map.bookmark.MapBookmarkManager;
import net.tourbook.map.bookmark.MapLocation;
import net.tourbook.map.bookmark.MapPosition_with_MarkerPosition;
import net.tourbook.map2.Messages;
import net.tourbook.map25.action.ActionMap25_ShowMarker;
import net.tourbook.map25.action.ActionShowEntireTour;
import net.tourbook.map25.action.ActionShowPhotos;
Expand Down Expand Up @@ -1603,6 +1602,8 @@ void restoreState() {
// other layers
_mapApp.getLayer_BaseMap().setEnabled(Util.getStateBoolean(_state, STATE_IS_LAYER_BASE_MAP_VISIBLE, true));
_mapApp.getLayer_Building().setEnabled(Util.getStateBoolean(_state, STATE_IS_LAYER_BUILDING_VISIBLE, true));
//handling S3DB like building, not used layer will be removed in map25app
_mapApp.getLayer_S3DB().setEnabled(Util.getStateBoolean(_state, STATE_IS_LAYER_BUILDING_VISIBLE, true));

_mapApp.getLayer_MapBookmark().setEnabled(Util.getStateBoolean(_state, STATE_IS_LAYER_BOOKMARK_VISIBLE, true));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public Bitmap drawTrackArrow(final int bitmapArrowSize, final int arrowColor) {
trackArrowPainter.setColor(arrowColor);

defaultMarkerCanvas.drawLine(bitmapArrowSizeF, bitmapArrowSizeF / 2, 1f, bitmapArrowSizeF, trackArrowPainter);
defaultMarkerCanvas.drawLine(1f, bitmapArrowSizeF, 1f, 1f, trackArrowPainter);
//defaultMarkerCanvas.drawLine(1f, bitmapArrowSizeF, 1f, 1f, trackArrowPainter); //looks better when arrow is open
defaultMarkerCanvas.drawLine(1f, 1f, bitmapArrowSizeF, bitmapArrowSizeF / 2, trackArrowPainter);
defaultMarkerCanvas.drawLine(bitmapArrowSizeF, bitmapArrowSizeF / 2, 1, bitmapArrowSizeF / 2, trackArrowPainter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ private LineStyle createLineStyle() {
_tex = new TextureItem(_bitmapArrow);

//width must not to tiny, otherwise no place that arrow can be painted
final float faterOutlineWidth = Math.max(trackConfig.outlineWidth, 5f);
final float faterOutlineWidth = Math.max(trackConfig.outlineWidth * 2, 5f);

final LineStyle style = LineStyle.builder()
.stippleColor(ColorUtil.getARGB(trackConfig.outlineColor, trackConfig.outlineOpacity * 0xff / 100))
Expand Down

0 comments on commit 8ca5e2e

Please sign in to comment.