Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6331577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:05:47+00:00 2026-05-24T18:05:47+00:00

I’m trying to create an OpenLayers UI with two basic capabilities: there are fixed

  • 0

I’m trying to create an OpenLayers UI with two basic capabilities:

  • there are fixed features on the map, and users get additional information on the page (not popups on the map) when they hover over a fixed feature;

  • there is one draggable reference point, which a user can move around the map.

I’ve currently got each of these working independently. I have two vector layers, one for fixed features and one for the draggable feature. The first layer has a OL.Control.SelectFeature control with {hover:true}, the second has a OL.Control.DragFeature control. However, when I enable the DragFeature control, the SelectFeature control no longer gets any events when I mouse over the fixed features. Conversely, if I raise the z-index of the fixed-features layer (as suggested here) the draggable feature cannot be dragged. That suggests that only the topmost layer is available to user interaction.

I assume I’m making a fairly basic mistake here. How do I allow the user to interact with the features on two layers? Or, alternatively, is there a better way of designing the user experience I outllned above?

The other alternative I can see is that I put both types of feature on one layer, and somehow prevent the fixed features from responding to drag interaction. However, looking through the OpenLayers API, I can’t see any obvious way of getting the DragFeature control to abandon a drag interaction once intiated by the user.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:05:48+00:00Added an answer on May 24, 2026 at 6:05 pm

    OK, found a solution to this: the SelectFeature control needs to be attached to both layers, and the hover event handler then checks to see if the feature is selectable. The draggable feature remains on a separate layer, so it is the only draggable object. This posting was helpful in figuring out the answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.