NewSignature / us-map

An interactive map of the United States using Raphaël
BSD 2-Clause "Simplified" License
279 stars 184 forks source link

Adding Puerto Rico #55

Open ididthis opened 9 years ago

ididthis commented 9 years ago

I've got the shape of Puerto Rico figured out, and it is output on the map, but it is over New Mexico. How would I position it just off of Florida?

kjrhody commented 7 years ago

I actually need to add Puerto Rico as well. Did you end up figuring this out?

kcaran commented 7 years ago

I have a pull request that allows you to specify which territories you'd like to include ('PR', 'VI', 'GU', 'AS', 'MP'). The terrBoxX and TerrBoxY values move the territory labels to where you want them.

https://github.com/kcaran/us-map

Example here: http://www.kcaran.com/us-map-example/

kjrhody commented 7 years ago

Thanks! Do you have a quick example showing how to implement the terrBoxX and terrBoxY variables in the code?

kjrhody commented 7 years ago

Never mind, I implemented it just fine using the following:

            'includeTerritories': [ 'PR' ],
            terrBoxX: 600,
            terrBoxY: 525,

Thank you, it works great! Hope that it's incorporated into the main package in the future.

adamlesniak commented 7 years ago

+1 for implementing that onto master - as it's US state.

kjrhody commented 7 years ago

Has anyone found a way to move the labels for individual territories, rather than just the whole list? I tried writing some code to implement this myself but figured I'd see if anyone else had given it a try.