Skip to main content

Waypoints on local tiles?

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2012-04-27

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.
Joined: 2011-06-01

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.

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

Joined: 2012-04-27

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.