0

I have a java GUI swing application with three frames. I want to load a map from a shape file and draw the map on an existing application frame. For this I use GeoTools framework. I've looked at the examples and all examples have drawn the map on a separate GUI window JMapFrame.

(I've followed this link )

Is there a way which we can embed a map that we have created using Geotools to an existing Java Swing application.

tybandara
  • 279
  • 2
  • 10
  • Maybe start by taking a look at [MapPane](http://docs.geotools.org/latest/javadocs/org/geotools/swing/JMapPane.html) – MadProgrammer Apr 05 '16 at 03:19
  • A quick look at the Javadocs suggests maybe embedding a JMapPane in the existing frame may be the way to go. I have not tried it however. – paisanco Apr 05 '16 at 03:21
  • Thanks. I'm currently working on what you suggested. In the mean time, my end application would need features like adding new lines, nodes to the map, selecting a line/node on the map and displaying properties of that selected part and drawing names/values on the map. (Eg: population of a city). I'm curious whether JMapPane is the answer for this as the document says JMapPane is just for demo purpose, but not intended for Desktop GIS apps. Please comment on this. – tybandara Apr 05 '16 at 13:25

0 Answers0