OpenGeoscience / geojs

High-performance visualization and interactive data exploration of scientific and geospatial location aware datasets
https://opengeoscience.github.io/geojs
Apache License 2.0
432 stars 75 forks source link

Virtual DOM API #255

Open waxlamp opened 9 years ago

waxlamp commented 9 years ago

The idea is to emulate DOM for the GL layer.

Basically, on certain mouse events (mouseover etc.) the system could manufacture a DOM element to hang DOM-based features on (e.g., Bootstrap popovers). The config for this behavior could include such things as

This would be a very general way to bridge JavaScript features over into the GL layer. Performance plus fanciness :raised_hand::collision:

aashish24 commented 9 years ago

this is an interesting idea. Are you thinking that the DOM element would be for each mark (where mark is a circle)?

waxlamp commented 9 years ago

Something like that. To avoid performance/memory issues, these DOM elements could/should be transient. I thought of this because I recently adapted the Tangelo Flickr demo to use GeoJS, and I was prevented from using a GL feature layer (which I wanted because I could then increase the amount of data I handle) because I wanted to keep my Bootstrap popovers in the demo. I imagined an API for the GL feature layer that would abstractly present me with a DOM element on, e.g., mouseover, that I could then use to hang a popover on. This seems better than replicating every DOM-enabled feature on the GL side as demand for them appears, which is a task of Sisyphean proportions.