Skip to content

de JXMapViewer

homebeaver edited this page Feb 3, 2023 · 2 revisions

JXMapViewer ist eine Klasse im package org.jxmapviewer.

A tile oriented map component that can easily be used with tile sources on the web like Google and Yahoo maps, satellite data such as NASA imagery, and also with file based sources like pre-processed NASA images. Note, the JXMapViewer has three center point properties.

  • The addressLocation property represents an abstract center of the map. This would usually be something like the first item in a search result. It is a GeoPosition.
  • The centerPosition property represents the current center point of the map. If the user pans the map then the centerPosition point will change but the addressLocation will not. Calling recenterToAddressLocation() will move the map back to that center address.
  • The center property represents the same point as the centerPosition property, but as a java.awt.geom.Point2D in pixel space instead of a GeoPosition in lat/long space. Note that the center property is a Point2D in the entire world bitmap, not in the portion of the map currently visible. You can use the getViewportBounds() method to find the portion of the map currently visible and adjust your calculations accordingly. Changing the center property will change the centerPositionproperty and vice versa. All three properties are bound.
public class org.jxmapviewer.JXMapViewer extends JPanel implements DesignMode ...

GPX

GPX GPS Exchange Format ist ein XML-Datenformat mit Geo-Ortspunkten, -Routen und -Tracks.

Geo-Ortspunkt

Ein Geo-Ortspunkt, oder Wegpunkt, abgekürzt WP (engl. waypoint), ist eine Positionsangabe auf der Erde. Im mapviewer gibt es die Klasse GeoPosition, die einen Ortspunkt mit seinen Koordinaten beschreibt. Waypoint ist ein interface.

public class org.jxmapviewer.viewer.GeoPosition implements Serializable {

    private double latitude;
    private double longitude;
...

public interface org.jxmapviewer.viewer.Waypoint {

    public GeoPosition getPosition();
}

In GPX ist der Begriff Waypoint weitergehend. Zu den Koordinaten können optional weitere Attribute hinzukommen, z.B. elevation. Ein gpxparser würde dann so aussehen:

public class Waypoint extends Extension {

	private double latitude;
	private double longitude;

	private double elevation;
	// weitere Attribute

Route vs und Track

Was ist der Unterschied zwischen Routen und Tracks?

Eine Route/Track besteht aus einer Abfolge von Ortspunkten. Oft durch eine Linie verbunden. Nach dieser Definition gibt es keinen Unterschied. Der (historische) Unterschied liegt in der Verwendung.

  • Eine Route beschreibt einen geplanten Kurs zum Ziel
  • Ein Track ist eine Aufzeichnung eines in der Vergangenheit zurückgelegten Weges. -

Man kann also Tracks als Routen verwenden.

Glossar

A

Algorithmus : eine Sammlung von Algorithmen in java, von Euklid bis RSA

AutoComplete : package bzw. class zur Autovervollständigung in Text Komponenten

B

Batik : Subprojekt von Apache XML Graphics Project

BSAF : Better Swing Application Framework

BuddySupport : erweitert Textkomponenten

C

Color : Farben im Farbkreis, Farbraum

Collection views : zu den SwingX collection views gehören JXList, JXTree, JXTable und JXTreeTable

ComboBox : allgemein (Wikipedia)

D

Data Transfer : wird im Java Kontext zusammen mit Cut&Paste und Drag and Drop verwendet

Demos : Demos-doku, github repo: SwingSet3-demos

dependences : projects in SwingSet3

DnD : steht für Drag and Drop

E

EDT : Event Dispatch Thread

F

G

GPX : GPS Exchange Format - ein XML-Datenformat mit Geo-Ortspunkten, -Routen und -Tracks

GUI : Graphical User Interface, Benutzeroberfläche, allgemein, siehe auch L&F (Look&Feel)

GVT : Batik Graphics Vector Tree (GVT) gehört zu Apache XML Graphics Project

H

I

J

JDNC : Java Desktop Network Component, s. BSAF

JPMS : Java Platform Module System, aka Modulsystem Jigsaw

JTextComponent, JTextField, JTextArea : siehe Prompt- und BuddySupport

K

Kenai : History of SwingLabs

L

L&F : als Look&Feel wird das Aussehen und Verhalten der Benutzeroberfäche bezeichnet.

LazyValue : TODO siehe MetalButtonPainterIssues

List, JList, JXList : Listen von Werten darstellen List, JList, JXList

M

maven central : Central OSSRH

N

Nimbus : Mit Java 1.6 wurde das cross-platform Look-and-Feel eingeführt. Es wird per properties konfiguriert, siehe Nimbus-UI-defaults

O

OSSRH : Open Source Software Repository Hosting, zentrales öffentliches Repository für Artefakte: Central-OSSRH

P

PLAF : steht für Pluggable Look And Feel

PromptSupport : erweitert Textkomponenten

public key server : siehe distributing-your-public-key

Q

R

Renderer : die Darstellung von mehr oder weniger komplexen Objekten auf der Benutzeroberfäche im gewählten Look&Feel

S

SAM : Single Abstract Method interface, Beispiel StringValue

SVG : Scalable Vector Graphics, XML-Beschreibung von Vektorgrafiken

SwingLabs : History of SwingLabs

SwingSet2 : github repo: SwingSet2-demos

SwingSet3 : github repo: SwingSet3, SwingSet3-demos

SwingX : package org.jdesktop.swingx SwingX

Synth : Seit Java 1.5 gibt es das Synth-Look-and-Feel, dessen Erscheinungsbild in einer XML-Datei beschrieben wird, s. Nimbus

T

Table : JXTable (de) erweitert javax.swing.JTable

Tests : Tests (de)

TextComponent : siehe Prompt- und BuddySupport

Tree : JXTree (de) erweitert javax.swing.JTree

TreeTable : JXTreeTable (de) ist ein Zwitter mit Eigenschaften von Tree und Table

Trident : Trident animation library (de)

U

UI : User Interface, Benutzerschnittstelle, allgemein, siehe auch GUI, L&F (Look&Feel)

V

W

X

Y

Z

Clone this wiki locally