Skip to content
Alexander Wöstmann edited this page May 4, 2017 · 1 revision

JavaFX Map Module

A JavaFX component, using Geotools to display a map from a Web Map Service in a JavaFX Canvas.

About

The Map is obtained via a Geotools WMSLayer and then rendered into a FXGraphics2D using a StreamingRenderer. FXGraphics2D is a Graphics2D implementation that can target a JavaFX Canvas.

A small demo application is available at https://github.com/awoestmann/geotools-fx-map-test/

Available Functions

  • Panning
  • Zooming
  • Mouse Controls
  • Drawing a polygon in well-known text format
  • Adding layers to the map
  • Changing CRS
  • Drawing Maker/Bounding Boxes on the map

To do

  • Use image scaling to provide a smoother experience while zooming
  • Improve behaviour near maximum map bounds
  • Polygon selection

Used libraries:

  • Geotools ((C) 2008, Open Source Geospatial Foundation (OSGeo))

  • JFree FXGraphics2D (Copyright (c) 2014, Object Refinery Limited)

Clone this wiki locally