react-usa-map icon indicating copy to clipboard operation
react-usa-map copied to clipboard

Filling for DC doesn't work

Open shir opened this issue 5 years ago • 4 comments
trafficstars

I fill all states with a color including DC but DC stays gray

AK: {fill: "#B5C460"}
AL: {fill: "#B5C460"}
AR: {fill: "#B5C460"}
AZ: {fill: "#B5C460"}
CA: {fill: "#B5C460"}
CO: {fill: "#B5C460"}
CT: {fill: "#B5C460"}
DC: {fill: "#B5C460"}
DE: {fill: "#B5C460"}
FL: {fill: "#B5C460"}
GA: {fill: "#B5C460"}
HI: {fill: "#B5C460"}
IA: {fill: "#B5C460"}
ID: {fill: "#B5C460"}
IL: {fill: "#B5C460"}
IN: {fill: "#B5C460"}
KS: {fill: "#B5C460"}
KY: {fill: "#B5C460"}
LA: {fill: "#B5C460"}
MA: {fill: "#B5C460"}
MD: {fill: "#B5C460"}
ME: {fill: "#B5C460"}
MI: {fill: "#B5C460"}
MN: {fill: "#B5C460"}
MO: {fill: "#B5C460"}
MS: {fill: "#B5C460"}
MT: {fill: "#B5C460"}
NC: {fill: "#B5C460"}
ND: {fill: "#B5C460"}
NE: {fill: "#B5C460"}
NH: {fill: "#B5C460"}
NJ: {fill: "#B5C460"}
NM: {fill: "#B5C460"}
NV: {fill: "#B5C460"}
NY: {fill: "#B5C460"}
OH: {fill: "#B5C460"}
OK: {fill: "#B5C460"}
OR: {fill: "#B5C460"}
PA: {fill: "#B5C460"}
RI: {fill: "#B5C460"}
SC: {fill: "#B5C460"}
SD: {fill: "#B5C460"}
TN: {fill: "#B5C460"}
TX: {fill: "#B5C460"}
UT: {fill: "#B5C460"}
VA: {fill: "#B5C460"}
VT: {fill: "#B5C460"}
WA: {fill: "#B5C460"}
WI: {fill: "#B5C460"}
WV: {fill: "#B5C460"}
WY: {fill: "#B5C460"}
Screenshot 2020-07-29 at 13 59 06

shir avatar Jul 29 '20 10:07 shir

In the source I found that for filling DC two "states" are used "DC1" and "DC2". Not sure what "DC1" is doing but "DC2" works for me.

I think this should be described in README at least. Or "DC" fill color should be used for both "DC1" and "DC2".

shir avatar Jul 29 '20 11:07 shir

Also, the title for DC state doesn't work and I don't see ways to set it.

shir avatar Jul 29 '20 11:07 shir

@shir @gabidavila - Did you notice that DC's cursor style is different than the 50 states?

https://github.com/gabidavila/react-usa-map/issues/29

Screen Shot 2020-10-27 at 4 30 30 PM

ACPK avatar Oct 27 '20 20:10 ACPK

DC2 works for filling in the color, but i can't seem to get the onClick handler to work. i even found the dimensions for DC and added them to the data but it still doesn't work. and when you hover over DC it says "blank US states map." this plugin made it super easy to make a clickable US map, but DC being broken complicates things.

edit: found a workaround! i filled DC2 for color and used the default onClick function for it. you can change the name for it in dist/index.js in defaultProps. you could directly edit defaultProps more if you wanted to.

christorepl avatar Dec 08 '20 04:12 christorepl