Polygon clickable=false problem : Please help.
|
#1 -
23/08/2010 15:46:36
|
Reporta abuso
|
Link permanente
|
|
Polygon clickable=false problem : Please help.
|
|
|
|
|
Hi, Hope someone can help. I have a polygon that is used to denote a border. I wish to capture the Lat and Long for the point the user has clicked inside this border using Server Side events.
However, with the polygon created, the OnClick event for the map does not fire, only the OnPolygonClick. However with OnPolygonClick, e.point only returns the centre of the polygon, not the location the user clicked.
I have tried setting the Polygon property "clickable" to false, but then the polygon does not render at all. Is this a bug?
I want to capture the Lat and Long for the actual click, not the centre of the polygon, or turn off the click event for polygons. Is this possible?
Best regards and many thanks, Scott Halls
|
|
|
|
|
|
#2 -
30/08/2010 17:05:34
|
Reporta abuso
|
Link permanente
|
|
RE: Polygon clickable=false problem : Please help.
|
|
|
Thanks for the solution!!
Regards.
|
|
|
|
|
|
|
#3 -
24/08/2010 12:27:17
|
Reporta abuso
|
Link permanente
|
|
RE: Polygon clickable=false problem : Please help.
|
|
|
Hi, I have managed to solve the problem.
It seems as though the javascript for the polygon is using "clickable:False" rather than "clickable: false".
I have go round this by adding custom javascript to the google maps, as shown below.
Dim Points As New List(Of Subgurim.Controles.GLatLng) Dim objJS As New Text.StringBuilder
**** Add point here ******
Dim objPolygon As New Subgurim.Controles.GPolygon objPolygon.points = Points objPolygon.clickable = False objPolygon.fillColor = "004444" objPolygon.fillOpacity = 0.1 objPolygon.strokeColor = "001144" objPolygon.strokeWeight = 2 objPolygon.close()
objJS.Append("function addborder()") objJS.Append("{") objJS.Append(objPolygon.ToString(vobjGMAP.GMap_Id)) objJS.Replace("clickable:False", "clickable: false") ' Replace incorrect False statement objJS.Append("}")
vobjGMAP.addCustomInsideJavascript("addborder();") vobjGMAP.Add(objJS.ToString)
|
|
|
|
|
|
|
#4 -
24/08/2010 10:40:00
|
Reporta abuso
|
Link permanente
|
|
RE: Polygon clickable=false problem : Please help.
|
|
|
I have tried this, but unfortunately this doesn't solve the problem
I have added the OnClick event as a Listener. However, the event OnClick does not fire when the polygon is added and I still can't see a way to capture the Lat and Long for the OnClick event with the polygon visible.
Regards, Scott
|
|
|
|
|
|
|
|