Questions tagged [jmapviewer]

JMapViewer is an open-source OpenStreetMap viewer for Java applications.

JMapViewer is an open-source OpenStreetMap viewer for Java applications.

57 questions
1
vote
1 answer

JMapViewer: strange behavior of setMovementMouseButton() method

I am trying to change the mouse button to pan the map view from the right button to left. There is a simple code changing the button after the left mouse button has been clicked: public class Map extends JMapViewer { public Map() { …
justik
  • 4,145
  • 6
  • 32
  • 53
1
vote
1 answer

JMapViewer in NetBeans: adding only map to a GUI JPanel

I am trying to learn JMapViewer, and have a map embedded in a JPanel, which is a part of CardLayout. At this point, I only want to display a map without zoom, mouse action listeners, etc. So, I created a GUI frame in NetBeans with CardLayout and a…
Igor Tupitsyn
  • 1,193
  • 3
  • 18
  • 45
1
vote
2 answers

New Line in MapMarkerCircle, JMapViewer

So i am new to JMapViewer (and StackOverFlow). What I am currently trying to do is to develop a real time graphical representation of a network, where the background is a map of the area. So far it's been going well, however one issue is bugging me.…
1
vote
1 answer

coordinates point is in jmapviewer polygon?

I'm making a program in Java that displays a map using JMapViewer and draws a static polygon. When the user clicks in the map the program say "the point where you have clicked is in polygon" or "not in polygon". How I can do for calculate when the…
Luca
  • 13
  • 4
1
vote
1 answer

How can I highlight a MapMarkerDot in Openstreetmap?

I used code from http://svn.openstreetmap.org/applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java to get a map up and running for my swing application. I added a few MapMarkerDot to indicate some points in my map and used…
MTA
  • 739
  • 2
  • 9
  • 29
1
vote
2 answers

Java JMapViewer: How can I change the color of a MapPolygon?

I'm creating an application for drawing pollution information on a JMapViewer. I want to do this with MapPolygons, but I didn't find a good documentation about it. I succeeded to create new MapPolygons like this: private MapPolygon getPolygon(double…
mbur
  • 21
  • 4
1
vote
1 answer

Is JMapViewer thread-safe?

I'm writing an applicaton that uses JMapViewer. There are several threads (executed in a ThreadPoolExecutor) which acts over the displayed map (mainly creating/destroying and changing the color of some MapMarkerCircle). Does this violate the Single…
DevOlly
  • 91
  • 1
  • 5
1
vote
1 answer

How I can put an image like an arrow between two points in JMapViewer

How I can put an image that goes from point p1 to point p2? Anyone can suggest a way to me? Edit: I follow this example, Draw Line between two Geo Points in JMapViewer, to draw a path between two geoPoints. But when I try to delete a MapPolygon,…
doflamingo
  • 77
  • 1
  • 1
  • 9
1
vote
1 answer

java.util.ConcurrentModificationException on moving jMapViewer

I'm trying to update markers on a jMapViewer once every 5 seconds. This seems to be working fine until you move the map. At this point it throws a java.util.ConcurrentModificationException. I believe this is to do with the different processes trying…
KieranS
  • 35
  • 7
1
vote
0 answers

Transparent overlays with JMapViewer?

JMapViewer provides layers for displaying markers and other graphical elements on top of an OSM map. Is it also possible to use a (transparent) tile overlay on top of a basemap, i.e. to display more than one map at a time?
rmv
  • 3,195
  • 4
  • 26
  • 29
1
vote
1 answer

JMapViewer adding tiles of a region on Panel

Hi there i'm using JMapViewer to show maps in my swing app and I've successfully created a panel with map tiles on it but these map tiles are of a particular area used in demo source of Map Viewer, i'm confused about how can i show the tiles of some…
user2945575
1
vote
1 answer

Adding a JLabel to a JMapViewer

Hello I am trying to add a JLabel to a JMapViewer, my current code is JLabel label = new JLabel(jlabels[x]); Point point = map.getMapPosition(lat, lng, false); map.add(label); label.setLocation(point); MapMarker…
broliverparker
  • 217
  • 2
  • 15
1
vote
1 answer

JMapViewer centering

I am trying to put a JMapViewer into a program I am doing and I want it to be centered in a specific area (Leicester, UK). Although I am not sure how the .setDisplayPosition function works and how I can use the co ordinates i have for it to do this…
broliverparker
  • 217
  • 2
  • 15
1
vote
1 answer

JMapViewer disable zoom

Is there a way to prevent the map from zooming outside from a certian zoom level? I've tried to cancel the mouse wheel scrolling event (in case its a zoom out), and to hide the zoom in/out control. map.addMouseWheelListener(new MouseWheelListener()…
Oz Radiano
  • 779
  • 2
  • 11
  • 30
1
vote
2 answers

Using MapDotMarkers with JMapViewer

I have two questions about JMapViewer: After adding MapDotMarkers to my map, I want to couple each dot with a summary list (a certain Pannel having some text written in it, probably some description about the dot). How can I do that? What method…