Zn2O / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Polygon and MapClickEvent #149

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:

 * Trunk, built on 2008-07-11, 10:59pm

Detailed description:

I am trying to implement a GWT version of MyMapToolBar found at
http://gmaps-samples.googlecode.com/svn/trunk/poly/mymapstoolbar.html

Last night I rebuilt GWT and gwt-maps from the trunk, and was pleased to
start coding away (thanks for the new methods on Polyline in the last few
weeks). The marker implementation of mymapstoolbar was straightforward, but
I got stuck on the Polyline example. 

It seems that when you create a polyline, and attempt to "close" it by
clicking on the first node, the MapClickEvent realizes that we have clicked
on the polyline overlay, but does not know "where" it is (ie a  LatLng on
the map, or which vertex in the polyline, or if it is on the line and not a
vertex).

Workaround if you have one:

Nope. I am sure there is a JSNI binding but I am still a little
trepidacious about JSNI at this point in my GWT discoveries.

Links to the relevant GWT Developer Forum posts:

None. But I have attached my eclipse project. If you fix up the library
paths, you should be able to launch it, tinker with creating a polyline,
and see how far I got before being stumped. There are a couple of TODOs in
MyMapToolBar.java that indicate where I got stuck.

Original issue reported on code.google.com by stuartmo...@gmail.com on 12 Jul 2008 at 10:07

Attachments:

GoogleCodeExporter commented 9 years ago
I think you want to use the "PolylineClickHandler" which I don't see a 
reference to
in your project.  See 

http://code.google.com/apis/maps/documentation/reference.html#GPolyline

This should be in the r290 release.

Original comment by galgwt.reviews@gmail.com on 12 Jul 2008 at 10:41

GoogleCodeExporter commented 9 years ago
You should look in the HelloMaps example, specifically the "Drawing Demo" 
section.  It covers this use case.

Original comment by mmendez+personal@google.com on 23 Jul 2008 at 2:53