Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to do some complex thing. I wonna have:

  1. popup with a name of a feature on mouse hover,
  2. popup with more complex info ( name, foto, etc.) after mouseclick on the same feature - the same layer.

It is possible to have those two things at the same time??

share|improve this question

1 Answer 1

Think so.

OpenLayers.Handler.Feature - http://dev.openlayers.org/docs/files/OpenLayers/Handler/Feature-js.html#OpenLayers.Handler.Feature.touchstart

Just check if the feature is selected (onClick / selected) for the 2. popup and for the first one if its touched.

I'm not sure if it will work cross layer - don't think so though.

share|improve this answer
    
Thanks for fast answer. Well I'm just a beginner with javascript. Can U help me with some piece of code, handled this issue? –  alex Nov 18 '11 at 9:53
1  
Would like to help you, but have not a single running WebServer at the moment in my dev env. just trying to migrate to ngineX. Sorry. :( -- But check this: openlayers.org/dev/examples -- Did help me a few times! –  Styp Nov 18 '11 at 10:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.