The GeoTools code is *just* drawing you a picture, you can follow any other
java swing tutorial to work with mouse clicks and drawing a line :)

There is an example that shows a "Map Tools" (basically a mouse event that
reports map location rather then screen coordinates).

http://docs.geotools.org/latest/userguide/tutorial/map/style.html#shapefile-viewer-with-custom-map-tool

The example uses the co-ordinates to query the data and adjust a style. You
could use the co-ordinates to create an in memory feature and use a layer
to draw that feature.  But yeah, nobody has contributed good editing,
digitisation tools for GeoTools. You are welcome to do so - and add to the
existing tutorials.

Jody Garnett


On Sat, Jun 28, 2014 at 4:15 AM, Tukajo <tjfri...@gmail.com> wrote:

> I am a bit confused here;
>
> I got the GEOTOOLS example to adequately load and am able to load up some
> maps however I cannot quite find how/where to go about adding customized
> mouse events.
>
> I want to be able to click on two separate positions on my map and draw a
> line between the two positions.
>
> Anyone got any resources/instructions I can read up on this?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Drawing-a-line-between-two-mouseclick-events-tp5148470.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to