Skip to main content

Waypoints on local tiles?

2 replies [Last post]
dsreddy
Offline
Joined: 2012-04-27
Points: 0

Hi,
I have downloaded bunch of tiles and displayed a map with JXMapViewer. But I'm facing issues in displaying waypoints on the map. First of all , is it possible to show up waypoints on local tiles? or Is this possible to display waypoints only on single image where I can convert lat/long to x/y coordinates.
.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
monezz
Offline
Joined: 2011-06-01
Points: 0

Waypoints should not be connected to tiles at all.
They have coordinates and could be drawn on top of the map based on the current map location.
You can use mapViewer.getTileFactory().geoToPixel and mapViewer.getTileFactory().pixelToGeo to convert between map (lat/long) and screen (x/y) coordinates.

AgroSense is using a geoviewer based on JXMap with added functionality like layers.
https://blogs.oracle.com/geertjan/entry/leveraging_agrosense_geoviewer_a...

The AgroSense geoviewer currently does not feature a waypoint layer, but it shouldn't be difficult to add such a thing.

dsreddy
Offline
Joined: 2012-04-27
Points: 0

Thanks monezz for your reply. Somehow geoToPixel() is not working in my case. I'm not sure whether it really works on local maps or not. There is some appraoch about converting lat/long to local coordinates that may work for local maps.