leaflet - D3.js SVG on OpenLayers3 interactive map -


i trying figure out how hard integrate d3.js openlayers 3 create beautiful interactive map.

i looking @ mike's example, d3 + leaflet: http://bost.ocks.org/mike/leaflet/

and @ mike`s example d3.geo.path + canvas lose interactivity , css style support of svg.

and on openlayers-3 example site, there interactive map, integrates mike's example of d3.geo.path + canvas openlayers create interactive map:

so wondering, missing in openlayers3 allow creation of similar d3 + leaflet example, or possible considering ol3 design?

you can't use css approch used leaflet on openlayers, d3 + openlayer draw data using d3 on canvas wich used imagelayer.

you need use openlayer approch : layers + style , can have similar performance openlayers "imagevector" layers.

i edited jsfiddle style + imagevector:

http://jsfiddle.net/6r8rat8n/5/

var vector = new ol.layer.image({     source: new ol.source.imagevector({         source: vectorsource,         style: new ol.style.style({             fill: new ol.style.stroke({                 color: '#efefef',                 width: 1             }),             stroke: new ol.style.stroke({                 color: '#fff',                 width: 1             })         })     }) });   // select interaction working on "mousemove" var selectmousemove = new ol.interaction.select({   condition: ol.events.condition.mousemove,     style: new ol.style.style({                     fill: new ol.style.stroke({                         color: 'red',                         width: 1                     }),                     stroke: new ol.style.stroke({                         color: '#fff',                         width: 1                     })                 }) }); 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -