Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Geomap: Suggest combining OpenLayer configuration with data #5

Open
bsouster opened this issue Sep 16, 2016 · 2 comments
Open

Comments

@bsouster
Copy link

bsouster commented Sep 16, 2016

Hey @shawnthompson @jvanulde
The plugin is currently using the data-wb-geomap attribute to set the configuration of the map, separate from the data table(s).

I'm thinking it might be better to combine the configuration with data tables. It would be easier to read, identify relationships and much easier to write.

Consider formatting a legend item / set of table data in JSON

    "field": "Rank",
    "value": [3],
    "filter": "GREATER_THAN",
    "init": {
        "fillColor": "#e74c3c",
        "pointRadius": 2.6,
        "fillOpacity": 1.0,
        "strokeWidth": 8,
        "strokeColor": [ 231, 76, 60, 0.5 ]

And instead writing it into the data table

<table  data-wb-geomap='"id":"cities"'>
    <tr>
        <th data-wb-geomap='{ "label":"Label for legend", "fillColor":"#e74c3c", "pointRadius": 2.6, [etc] }'>Rank</th>
        <th>Census subdivision</th>
        <th>Population 2011</th>
    </tr>

See WET's charts and graphs for a working example of this approach:
http://wet-boew.github.io/v4.0-ci/demos/charts/custom-en.html

@duboisp

@jvanulde
Copy link
Collaborator

The only problem with this approach is that users would need to implement two different styling mechanisms, one for tabular data and one for external file-based data. Twice as much documentation would be required.

@jvanulde
Copy link
Collaborator

BTW - Geomap will be moving to a pure CSS styling solution in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants