3

I am using openlayers,when I query a list of pois from the server,I want to add the to the map one for each.

So I create marker for each of them,and I want a FrameCloud open when the marker is clicked.

I use this:

marker.events.resgister("click",marker,function(){
  this.pop.show();
});

However,when I drag the marker,the map will moved,and the event is triggered.

While I want nothing happen when use drag the marker,and the cursor should be pointer when mouseover the marker. Just like the google's marker.

How to implement this?

1 Answer 1

1

Try this:

marker.events.register('mousedown', marker, function(evt){
 this.pop.show();
 OpenLayers.Event.stop(evt); 
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.