Skip to content

Commit

Permalink
Map25: found the reason why map25 was not displayed correctly at the …
Browse files Browse the repository at this point in the history
…very first start. (#343)

* 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

Co-authored-by: top <top@MB14>
  • Loading branch information
telemaxx and top committed May 16, 2021
1 parent 1ab3a13 commit b052a13
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 32 deletions.
4 changes: 2 additions & 2 deletions bundles/net.tourbook/src/net/tourbook/map25/Map25ConfigManager.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class Map25ConfigManager {
public static final RGB DEFAULT_OUTLINE_COLOR = new RGB(0x80, 0x0, 0x80);
public static final int DEFAULT_OUTLINE_OPACITY = 70;
public static final float DEFAULT_OUTLINE_WIDTH = 2.5f;
public static final boolean DEFAULT_OUTLINE_IS_SHOW_DIRECTION_ARROW = true;
public static final boolean DEFAULT_OUTLINE_IS_SHOW_DIRECTION_ARROW = false;
public static final int OUTLINE_OPACITY_MIN = 1;
public static final int OUTLINE_OPACITY_MAX = 100;
public static final float OUTLINE_WIDTH_MIN = 0.1f;
Expand Down Expand Up @@ -724,7 +724,7 @@ private static void parse_050_TrackConfig(final XMLMemento xmlConfig, final Map2

case TAG_OUTLINE:

config.isShowDirectionArrow = Util.getXmlBoolean(xmlConfigChild, ATTR_OUTLINE_IS_SHOW_DIRECTION_ARROW, true);
config.isShowDirectionArrow = Util.getXmlBoolean(xmlConfigChild, ATTR_OUTLINE_IS_SHOW_DIRECTION_ARROW, DEFAULT_OUTLINE_IS_SHOW_DIRECTION_ARROW);
config.outlineColor = Util.getXmlRgb(xmlConfigChild, DEFAULT_OUTLINE_COLOR);
config.outlineOpacity = Util.getXmlInteger(xmlConfigChild, ATTR_OUTLINE_OPACITY, DEFAULT_OUTLINE_OPACITY, OUTLINE_OPACITY_MIN, OUTLINE_OPACITY_MAX);
config.outlineWidth = Util.getXmlFloatFloat(xmlConfigChild, ATTR_OUTLINE_WIDTH, DEFAULT_OUTLINE_WIDTH, OUTLINE_WIDTH_MIN, OUTLINE_WIDTH_MAX);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,10 @@ public static void addMapProviderListener(final IMapProviderListener listener) {
_mapProviderListeners.add(listener);
}

/**
* opensciencemap.org, server seems to be down since 2019-12
*/
private static Map25Provider createMapProvider_Default() {

final Map25Provider mapProvider = new Map25Provider();

//mapProvider.isDefault = true;
mapProvider.isEnabled = false;
mapProvider.name = Messages.Map25_Provider_OpenScienceMap_Name;
mapProvider.online_url = "http://opensciencemap.org/tiles/vtm"; //$NON-NLS-1$
mapProvider.online_TilePath = "/{Z}/{X}/{Y}.vtm"; //$NON-NLS-1$
mapProvider.tileEncoding = TileEncoding.VTM;
mapProvider.theme = VtmThemes.DEFAULT;
mapProvider.description = Messages.Map25_Provider_OpenScienceMap_Description;

//_defaultMapProvider = mapProvider;

return mapProvider;
}

/**
* mapilion.com/
*/
private static Map25Provider createMapProvider_Mapilion() {
private static Map25Provider createMapProvider_Default() {

final Map25Provider mapProvider = new Map25Provider();

Expand Down Expand Up @@ -372,7 +351,7 @@ private static synchronized ArrayList<Map25Provider> loadMapProvider() {
* Create default map providers
*/
allMapProvider.add(_defaultMapProvider);
allMapProvider.add(createMapProvider_Mapilion());
//allMapProvider.add(createMapProvider_Mapilion());
allMapProvider.add(createMapProvider_Mapzen());
allMapProvider.add(createMapProvider_Mapsforge());
allMapProvider.add(createMapProvider_MyTileServer());
Expand Down
7 changes: 3 additions & 4 deletions bundles/net.tourbook/src/net/tourbook/map25/layer/marker/MarkerToolkit.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import net.tourbook.common.color.ColorUtil;
import net.tourbook.map.bookmark.MapBookmark;
import net.tourbook.map25.Map25ConfigManager;
import net.tourbook.map25.layer.tourtrack.Map25TrackConfig;

import org.oscim.backend.CanvasAdapter;
import org.oscim.backend.canvas.Bitmap;
Expand Down Expand Up @@ -352,16 +351,16 @@ public Bitmap drawStar(final int bitmapStarSize, final int starColor) {
return _bitmapStar;
}

public Bitmap drawTrackArrow(final int bitmapArrowSize, final int starColor) {
final Map25TrackConfig trackConfig = Map25ConfigManager.getActiveTourTrackConfig();
public Bitmap drawTrackArrow(final int bitmapArrowSize, final int arrowColor) {
//final Map25TrackConfig trackConfig = Map25ConfigManager.getActiveTourTrackConfig();
final Bitmap bitmapTrackArrow = CanvasAdapter.newBitmap(bitmapArrowSize, bitmapArrowSize, 0);
final float bitmapArrowSizeF = bitmapArrowSize - 1;
final org.oscim.backend.canvas.Canvas defaultMarkerCanvas = CanvasAdapter.newCanvas();
defaultMarkerCanvas.setBitmap(bitmapTrackArrow);
final Paint trackArrowPainter = CanvasAdapter.newPaint();
trackArrowPainter.setStyle(Paint.Style.STROKE);
trackArrowPainter.setStrokeWidth(6);
trackArrowPainter.setColor(starColor);
trackArrowPainter.setColor(arrowColor);

defaultMarkerCanvas.drawLine(bitmapArrowSizeF, bitmapArrowSizeF / 2, 1f, bitmapArrowSizeF, trackArrowPainter);
defaultMarkerCanvas.drawLine(1f, bitmapArrowSizeF, 1f, 1f, trackArrowPainter);
Expand Down
Empty file.
Empty file.
Empty file.
Empty file modified bundles/net.tourbook/src/net/tourbook/messages.properties
100644 → 100755
Empty file.
Empty file modified bundles/net.tourbook/src/net/tourbook/messages_de.properties
100644 → 100755
Empty file.
10 changes: 7 additions & 3 deletions info/release-notes/21.next.0-readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ Improvements
- Extending the zoom levels capacity from 20 to 23

* 2.5D Map (Thomas):
- Upgrading VTM lib to 0.15
- Size of photothumbnails can be changed via slideout
- Upgrading VTM lib to 0.15 321
- Size of photothumbnails can be changed via slideout 326
- Show direction arrows on the tourpath, controlled via slideout 339

* 3D Map & Tour Chart Preferences (Frederic)
- "Squeezed" several transparency values to be in between 0 and 100 instead of 0 & 255 or 0.0 and 1.0
Expand Down Expand Up @@ -90,7 +91,7 @@ Bugfix
- Displaying the hour from 0 when a new day starts

* Chart Create Tourmarker (Thomas)
- Same wording as on other places. "create marker" -> "create tour marker"
- Same wording as on other places. "create marker" -> "create tour marker" 331

* Compress Database
- Fixed SQL exception when the tour database size is too large to fit into an integer value
Expand All @@ -105,6 +106,9 @@ Bugfix
- Fixed a bug in the tour type viewer when selecting several tour types and only the first one was deleted.
- Disabling the "Rename" button when more than 1 tour type is selected

* Map25 Mapprovider (Thomas)
- map25 was not displayed correctly at the very first start of Mytourbook 343

Translation
===========

Expand Down

0 comments on commit b052a13

Please sign in to comment.