33 | | |
| 31 | {{{ |
| 32 | <crschmidt> so two selectfeature controls don't work |
| 33 | <crschmidt> they work in safari because safari fails at SVG |
| 34 | <crschmidt> so you need to fix your code |
| 35 | <crschmidt> specifically, what you should do is: |
| 36 | <crschmidt> 1. Change from "OnFeatureSelect" on the control to registereing for the "Featureselected" Event on the layer |
| 37 | <crschmidt> (The API is a bit different; featureselected event functions get an 'evt' object that has a .feature property you can access) |
| 38 | <crschmidt> 2. Create a single SelectFeature control with multiple layers: new OpenLayers.Control.SelectFeature([layer1, layer2]); |
| 39 | <flavour> We already do 2. within KML/GeoRSS/Internal Features, so what we need is a single one for all 3 types: good copy |
| 40 | <flavour> I'd seen 1. in some examples |
| 41 | <crschmidt> yeah |
| 42 | <crschmidt> it's the more recent style |
| 43 | <crschmidt> the 'onfeatureselect' stuff is old and busted because it wasn't well thought out |
| 44 | <crschmidt> http://hypercube.telascience.org/haiti/uav.html |
| 45 | <crschmidt> there's a reasonably concise example there |
| 46 | <crschmidt> as well as http://docs.openlayers.org/library/overlays.html#interaction |
| 47 | }}} |