From: Mikael C. <mik...@cl...> - 2009-11-05 11:07:15
|
Hi again, I've taken it a step further : 1) Point radius proportional to the zoom After a few tests trying to delegate the functionnality to OpenLayers, I gave up. The whole thing was gonna end up in really bad design (with Style instances holding a reference to the Map instance). I'll just implement the whole thing with a zoom listener. By doing this, I run into a new feature I'd like to add to GWT-OpenLayers (being able to define the point radius as a string). I'll create the Trac ticket. 2) Handling both hover events and click events at the same time for vector features In fact it was very easy, I'll create the Trac ticket. -- Mikael Couzic 2009/11/3 Mikael Couzic <mik...@cl...> > Hello, > > > I am working on a project involving GWT-OpenLayers, the project is in its > early phase and I'm currently building a prototype. > I'm using the 0.5 version because I need MapStyles. > > I have encountered technical limitations implementing two features, and I > felt I could use your advice : > > 1) Point radius proportional to the zoom > Here's an example of what I'd like to have : > http://www.palewire.com/openlayers-proportional-symbols/ > I guess I could use the zoom listener to implement this behaviour, but it > doesn't seem right. I'd rather delegate this task to OpenLayers. However, I > don't even know if it's possible (Did I mention I'm not very good in > JavaScript and JSNI ?). > I'd be happy to contribute to the project, but I woudn't like to start > anything before asking you guys if it's a good idea. > Maybe I can be more specific in my questions : > - Is it possible to implement such a behaviour in GWT-OpenLayers without > breaking the design ? > - How long would it take for a noob to master the art of JSNI enough to do > such a thing ? > - Where would you start ? > > 2) Handling both hover events and click events at the same time for vector > features > From my various tests, I concluded that the only way to trigger a feature > related event is through the SelectFeatureListener. It works great, but in > my case I want to trigger one event when the feature is hovered, and a > second when it is clicked. However, it is not possible because when it is > clicked it has already been selected by the hover. > From what I've seen from the code and the OpenLayers API, it shouldn't be > too difficult to implement this behaviour using the > SelectFeature.clickFeature() method. > I think I could do it, but if you guys think you can get it done quickly > you might want to consider the option. > What do you say, should I create a Trac ticket and get to it ? > > By the way, thanks for the great tool, i'm sure lots of people like me have > found it useful. > > > -- > Mikael Couzic > > |