propublica / landline

Simple SVG maps that work everywhere.
MIT License
167 stars 26 forks source link

Allow for default style parameters #3

Closed aboutaaron closed 9 years ago

aboutaaron commented 10 years ago

Currently, the default styling for the map is handled in the createMap function. If you didn't want the default gray fill and white stoke, you either have to manually adjust the map before running createMap() or override the function entirely to add you defaults.

I'd be nice if there was an attribute that contained the CSS the map used by default. That way you can just override that value and leave the functions alone or even have a third options object that could take CSS and other params. On the extreme, perhaps take the styling out entirely and require folks to add CSS themselves.

Just a thought.

ashaw commented 10 years ago

That's a good idea. Maybe we should have the default css in an object that's overwriteable. Wanna write that up and send a pull req?

sisiwei commented 9 years ago

Map default style options are now extracted out to the options file.