ramnathv / rMaps

Interactive Maps from R
http://rmaps.github.io
389 stars 194 forks source link

Bubbles are rendered underneath polygons when using custom topojson data #52

Open ghost opened 10 years ago

ghost commented 10 years ago

This occurs when serving the datamap through shiny. It does not occur if you simply save the datamap to html and serve it locally using something like a python simplehttp server. This problem also is limited to cases when you specify custom data through the dataUrl: geographyConfig arguments.

The hacky solution I found was to change the datamap html template to include the following:

    var map{{chartId}} = new Datamap(chartParams);
    map{{chartId}}.addLayer('datamaps-subunits',null, true)

in place of:

    var map{{chartId}} = new Datamap(chartParams);

Let me know if you want me to put together a simple example to reproduce the problem.

ramnathv commented 10 years ago

An example would be most useful, as it would help me understand the source of the problem before pushing a fix. Thanks for the bug report.

ghost commented 10 years ago

This should reproduce the problem: https://gist.github.com/mjgleaso/5cd3f183c93b64c08618