Changeset 31293 in osm for applications/viewer/jmapviewer/src
- Timestamp:
- 2015-06-20T13:27:47+02:00 (10 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
r30900 r31293 87 87 * Enables or disables that the map pane can be moved using the mouse. 88 88 * 89 * @param movementEnabled 89 * @param movementEnabled {@code true} to allow the map pane to be moved using the mouse 90 90 */ 91 91 public void setMovementEnabled(boolean movementEnabled) { … … 98 98 99 99 /** 100 * Sets the mouse button that is used for moving the map. Possible values 101 * are: 100 * Sets the mouse button that is used for moving the map. Possible values are: 102 101 * <ul> 103 102 * <li>{@link MouseEvent#BUTTON1} (left mouse button)</li> … … 106 105 * </ul> 107 106 * 108 * @param movementMouseButton 107 * @param movementMouseButton the mouse button that is used for moving the map 109 108 */ 110 109 public void setMovementMouseButton(int movementMouseButton) { -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java
r31077 r31293 233 233 234 234 /** 235 * @param args 235 * @param args Main program arguments 236 236 */ 237 237 public static void main(String[] args) { 238 // java.util.Properties systemProperties = System.getProperties();239 // systemProperties.setProperty("http.proxyHost", "localhost");240 // systemProperties.setProperty("http.proxyPort", "8008");241 238 new Demo().setVisible(true); 242 239 } … … 256 253 } 257 254 } 258 259 255 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
r31127 r31293 40 40 * 41 41 * @author Jan Peter Stotz 42 * 42 * @author Jason Huntley 43 43 */ 44 44 public class JMapViewer extends JPanel implements TileLoaderListener { … … 391 391 * the displayed map) into a latitude / longitude coordinate 392 392 * 393 * @param mapPointX 394 * @param mapPointY 393 * @param mapPointX X coordinate 394 * @param mapPointY Y coordinate 395 395 * @return latitude / longitude 396 396 */ … … 406 406 * Calculates the position on the map of a given coordinate 407 407 * 408 * @param lat 409 * @param lon 410 * @param checkOutside 408 * @param lat latitude 409 * @param lon longitude 410 * @param checkOutside check if the point is outside the displayed area 411 411 * @return point on the map or <code>null</code> if the point is not visible 412 412 * and checkOutside set to <code>true</code> … … 429 429 * @param lat Latitude 430 430 * @param offset Offset respect Latitude 431 * @param checkOutside 431 * @param checkOutside check if the point is outside the displayed area 432 432 * @return Integer the radius in pixels 433 433 */ … … 445 445 * Calculates the position on the map of a given coordinate 446 446 * 447 * @param lat 448 * @param lon 447 * @param lat latitude 448 * @param lon longitude 449 449 * @return point on the map or <code>null</code> if the point is not visible 450 450 */ … … 473 473 * Calculates the position on the map of a given coordinate 474 474 * 475 * @param coord 475 * @param coord coordinate 476 476 * @return point on the map or <code>null</code> if the point is not visible 477 477 */ … … 486 486 * Calculates the position on the map of a given coordinate 487 487 * 488 * @param coord 488 * @param coord coordinate 489 * @param checkOutside check if the point is outside the displayed area 489 490 * @return point on the map or <code>null</code> if the point is not visible 490 491 * and checkOutside set to <code>true</code> … … 501 502 * 502 503 * @return the meter per pixel 503 * @author Jason Huntley504 504 */ 505 505 public double getMeterPerPixel() { … … 875 875 * Enables or disables painting of the {@link MapMarker} 876 876 * 877 * @param mapMarkersVisible 877 * @param mapMarkersVisible {@code true} to enable painting of markers 878 878 * @see #addMapMarker(MapMarker) 879 879 * @see #getMapMarkerList() … … 997 997 * Enables or disables painting of the {@link MapRectangle} 998 998 * 999 * @param mapRectanglesVisible 999 * @param mapRectanglesVisible {@code true} to enable painting of rectangles 1000 1000 * @see #addMapRectangle(MapRectangle) 1001 1001 * @see #getMapRectangleList() … … 1013 1013 * Enables or disables painting of the {@link MapPolygon} 1014 1014 * 1015 * @param mapPolygonsVisible 1015 * @param mapPolygonsVisible {@code true} to enable painting of polygons 1016 1016 * @see #addMapPolygon(MapPolygon) 1017 1017 * @see #getMapPolygonList() -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerCircle.java
r30900 r31293 69 69 } 70 70 71 public void paint(Graphics g, Point position, int radi o) {72 int size_h = radi o;71 public void paint(Graphics g, Point position, int radius) { 72 int size_h = radius; 73 73 int size = size_h * 2; 74 74 -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java
r31135 r31293 8 8 * space is measured in pixels. The origin of the map space is the top left 9 9 * corner. The map space origin (0,0) has latitude ~85 and longitude -180. 10 * @author Jan Peter Stotz 11 * @author Jason Huntley 10 12 */ 11 13 public class OsmMercator { … … 38 40 /** 39 41 * Creates instance with provided tile size. 40 * @param tileSize 42 * @param tileSize tile size in pixels 41 43 */ 42 44 public OsmMercator(int tileSize) { … … 77 79 * @param zoomLevel the zoom level 78 80 * @return the distance 79 * @author Jason Huntley80 81 */ 81 82 public double getDistance(int x1, int y1, int x2, int y2, int zoomLevel) { … … 96 97 * @param lo2 the Longitude from 2nd coordinate in degrees 97 98 * @return the distance 98 * @author Jason Huntley99 99 */ 100 100 public double getDistance(double la1, double lo1, double la2, double lo2) { … … 127 127 * [-180..180] 128 128 * @return [0..2^Zoomlevel*TILE_SIZE[ 129 * @author Jan Peter Stotz130 129 */ 131 130 public double LonToX(double aLongitude, int aZoomlevel) { … … 151 150 * [-90...90] 152 151 * @return [0..2^Zoomlevel*TILE_SIZE[ 153 * @author Jan Peter Stotz154 152 */ 155 153 public double LatToY(double aLat, int aZoomlevel) { … … 181 179 * [0..2^Zoomlevel*TILE_WIDTH[ 182 180 * @return ]-180..180[ 183 * @author Jan Peter Stotz184 181 */ 185 182 public double XToLon(int aX, int aZoomlevel) { -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapMarker.java
r30900 r31293 47 47 * coordinates within <code>g</code> 48 48 * 49 * @param g 50 * @param position 51 * @param radi o49 * @param g graphics 50 * @param position coordinates 51 * @param radius radius 52 52 */ 53 public void paint(Graphics g, Point position, int radi o);53 public void paint(Graphics g, Point position, int radius); 54 54 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapPolygon.java
r30223 r31293 10 10 * Interface to be implemented by polygons that can be displayed on the map. 11 11 * 12 * @author Vincent 12 * @author Vincent Privat 13 13 */ 14 14 public interface MapPolygon extends MapObject{ … … 20 20 21 21 /** 22 * Paints the map rectangleon the map. The <code>points</code>22 * Paints the map polygon on the map. The <code>points</code> 23 23 * are specifying the coordinates within <code>g</code> 24 24 * 25 * @param g 26 * @param points 25 * @param g graphics 26 * @param points list of points defining the polygon to draw 27 27 */ 28 28 public void paint(Graphics g, List<Point> points); 29 29 30 30 /** 31 * Paints the map rectangleon the map. The <code>polygon</code>31 * Paints the map polygon on the map. The <code>polygon</code> 32 32 * is specifying the coordinates within <code>g</code> 33 33 * 34 * @param g 35 * @param polygon 34 * @param g graphics 35 * @param polygon polygon to draw 36 36 */ 37 37 public void paint(Graphics g, Polygon polygon); -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
r31142 r31293 84 84 * Constructs the tile url. 85 85 * 86 * @param zoom 87 * @param tilex 88 * @param tiley 86 * @param zoom zoom level 87 * @param tilex X coordinate 88 * @param tiley Y coordinate 89 89 * @return fully qualified url for downloading the specified tile image 90 * @throws IOException if any I/O error occurs 90 91 */ 91 92 String getTileUrl(int zoom, int tilex, int tiley) throws IOException; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java
r31143 r31293 35 35 private int tileSize = OsmMercator.DEFAUL_TILE_SIZE; 36 36 37 /** mapping <header key, metadata key>*/37 /** mapping <header key, metadata key> */ 38 38 protected Map<String, String> metadataHeaders; 39 39 … … 41 41 * Create a TileSourceInfo class 42 42 * 43 * @param name 44 * @param base_url 45 * @param id 43 * @param name name 44 * @param base_url base URL 45 * @param id unique id 46 46 */ 47 47 public TileSourceInfo(String name, String base_url, String id) { … … 54 54 * Create a TileSourceInfo class 55 55 * 56 * @param name 56 * @param name name 57 57 */ 58 58 public TileSourceInfo(String name) { … … 124 124 /** 125 125 * Sets the tile size provided by this tile source 126 * @param tileSize 126 * @param tileSize tile size in pixels 127 127 */ 128 128 public void setTileSize(int tileSize) { … … 135 135 /** 136 136 * 137 * @return mapping <HTTP header name, Metadata key name>for copying HTTP headers to Tile metadata137 * @return mapping <HTTP header name, Metadata key name> for copying HTTP headers to Tile metadata 138 138 * @since 31125 139 139 */
Note:
See TracChangeset
for help on using the changeset viewer.