Skip to content
Permalink
Browse files

Grid: use unicode characters

  • Loading branch information
devemux86 committed Dec 25, 2019
1 parent dece012 commit ed472a06488e852b1fb51cb9990f613e67dd74de
Showing with 5 additions and 11 deletions.
  1. +5 −11 mapsforge-map/src/main/java/org/mapsforge/map/layer/overlay/Grid.java
@@ -1,6 +1,6 @@
/*
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2015 devemux86
* Copyright 2015-2019 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -15,13 +15,7 @@
*/
package org.mapsforge.map.layer.overlay;

import org.mapsforge.core.graphics.Canvas;
import org.mapsforge.core.graphics.Color;
import org.mapsforge.core.graphics.FontFamily;
import org.mapsforge.core.graphics.FontStyle;
import org.mapsforge.core.graphics.GraphicFactory;
import org.mapsforge.core.graphics.Paint;
import org.mapsforge.core.graphics.Style;
import org.mapsforge.core.graphics.*;
import org.mapsforge.core.model.BoundingBox;
import org.mapsforge.core.model.Point;
import org.mapsforge.core.util.MercatorProjection;
@@ -46,16 +40,16 @@ private static String convertCoordinate(double coordinate) {
DecimalFormat df = new DecimalFormat("00");
int degrees = (int) Math.floor(coordinate);
sb.append(df.format(degrees));
sb.append('°');
sb.append('\u00b0');
coordinate -= degrees;
coordinate *= 60.0;
int minutes = (int) Math.floor(coordinate);
sb.append(df.format(minutes));
sb.append('');
sb.append('\u2032');
coordinate -= minutes;
coordinate *= 60.0;
sb.append(df.format(coordinate));
sb.append('');
sb.append('\u2033');
return sb.toString();
}

0 comments on commit ed472a0

Please sign in to comment.
You can’t perform that action at this time.