SkillAgentSearch skills...

Usmap

SVG US map, with plottable lat,lng. made with Raphael.js

Install / Use

/learn @the55/Usmap
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

I recommend using d3

When this project was made, d3.js was young and unproven and had no good story for doing maps. That has changed so much. These days, if you want to do data with a US map, consider using d3. Perhaps via...

  • http://datamaps.github.io/
  • https://d3-geomap.github.io/map/choropleth/us-states/
  • https://github.com/mbostock/d3/wiki/Geo-Projections

Javascript/SVG plottable US Map

Requirements:

To get something like demo page use:

var yourIntendedMapWidth = 600;
var container = 'dom-id-of-your-container-div';

var paper = new ScaleRaphael(container, 950, 650);
var map = paper.USMap();
paper.scaleAll(yourIntendedMapWidth/map.width);

map.plot(38.646908,-90.205994, "St. Louis, MO");
map.darkenState('MO', 0.07);

Credits

View on GitHub
GitHub Stars29
CategoryDevelopment
Updated2y ago
Forks10

Languages

HTML

Security Score

60/100

Audited on Mar 12, 2024

No findings