<font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif">i'm having a similar problem with polygons with </font></font></font><font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif">ModifyFeature activated </font></font></font><font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif">over a simple google layer<br>
i would like to drag the map even if the mouse is over a polygon <br><br>Is there a way to distinguish between "click and drag" and "simple click" over polygon??<br><br>...something like make the polygon pass the "click and drag" event to the map...<br>
<br>thanks<br><br><br>-Vito-</font></font></font><br clear="all">--<br>-----------<br>Tafuni Vito<br><a href="mailto:vito@vitotafuni.com">vito@vitotafuni.com</a><br>---------------------------------------------<br>"Verba volant, scripta manent... data corrupted"<br>
<br><br><div class="gmail_quote">2010/6/8 Brad Spencer <span dir="ltr"><<a href="mailto:bradspencer@ozemail.com.au">bradspencer@ozemail.com.au</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Stuart,<br>
<br>
I think its horses for courses really. A lot of people get hung up about<br>
mouseover interactivity and force programmers to do all sorts of gymnastics<br>
to try to make a loosely coupled web app look like as responsive as a<br>
desktop GIS. This is even worse when you are dealing with polygons -<br>
geometry gets filtered and loaded to the client just to give the mouseover<br>
interactivity which looks awful when you zoom in. Also, the area that a user<br>
decides to apply this approach to maynot be controllable by you and could<br>
lead to excessive and unnecessary geometry download times.<br>
<br>
When working with remote data services you may or maynot have access to WFS<br>
in which case you need to use getfeatureinfo requests to get the attributes<br>
on a click. If the data is private to the end user and does not belong to<br>
the WMS data provider at all then uploading geometry into the user's session<br>
from their desktop is the way to go providing the mouseover interactivity.<br>
<br>
Of course if you need the geometry in the client for real spatial analysis<br>
purposes then that is a different issue than doing it just for mouseover<br>
interactivity and is typically done on a more selective object basis.<br>
<br>
Now to answer your question regarding clicking on the vector layer. I found<br>
that you have to make the vector layer the top layer to avoid these<br>
conflicts. So I manipulate the z-index of the vector layer to make sure its<br>
at the top.<br>
<br>
Cheers, Brad....<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a> [mailto:<a href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a>] On<br>
Behalf Of gingerbbm<br>
Sent: Tuesday, June 08, 2010 2:26 AM<br>
To: <a href="mailto:users@openlayers.org">users@openlayers.org</a><br>
Subject: [OpenLayers-Users] Vector layer with map.events.register("click")<br>
<br>
<br>
Dear all<br>
<br>
I retrieve a set of points from GeoServer as a WMS tile. Using<br>
map.events.register('click',...) I attempt to retrieve information about a<br>
specific point when the map is clicked, using a bespoke WFS call.<br>
<br>
I am now required to provide some data about each point on mouseover so have<br>
been investigating OpenLayers.Layer.Vector and<br>
OpenLayers.Control.SelectFeature. My initial idea is to keep my original WMS<br>
layer and supplement it with a WFS-driven Vector layer. See this mock-up:<br>
<br>
<a href="http://v5dev.elgin.gov.uk/sw.html" target="_blank">http://v5dev.elgin.gov.uk/sw.html</a><br>
<br>
The idea is to set the opacity of the style of the vector objects to 0.01 to<br>
take advantage of the "selected" behaviour while seemingly not affecting the<br>
map appearance. But using this two-layer method, the map clicks are not<br>
triggering over the vector objects.<br>
<br>
So... two questions:<br>
<br>
1. Is there a way to make map.events.register('click',...) work when a<br>
vector object is selected?<br>
2. Should I abandon this and simply use the vector layer exclusively<br>
(plotting the relevant images at the appropriate points)?<br>
<br>
Would appreciate your advice.<br>
<br>
Thanks<br>
Stuart<br>
--<br>
View this message in context:<br>
<a href="http://osgeo-org.1803224.n2.nabble.com/Vector-layer-with-map-events-register%0A-click-tp5149829p5149829.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Vector-layer-with-map-events-register<br>
-click-tp5149829p5149829.html</a><br>
Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>