Giter Site home page Giter Site logo

brmap's Introduction

BrMap

Map of Brazil (html5, svg, js) - Interactive map for data visualizations. Bundled into a single Javascript file.

Intended to provide some data visualizations based on geographical data. It's SVG-based, can scale to any screen size.

  • Mapa do Brasil (HTML5, SVG, JS) - mapa interativo para visualização de dados. Empacotado em um único arquivo Javascript.

Getting Started

  1. Include 'brmap.js' on your page.
  2. Create a BrMap object, passing at least the parameter 'wrapper'.

Example:

<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8" />
<title>Brazil SVG</title>
</head>
<body>
	
	<div style="max-width: 600px;">
		<div id="br_mine"></div>
	</div>
	
	<script type="text/javascript" src="brmap.js"></script>
	<script type="text/javascript">
		new BrMap({
			wrapper: '#br_mine', 
			selectStates: ['sc'],
			callbacks: {
				click: function (element, uf) { alert(uf); },
				mouseover: function (element, uf){ console.log(uf); },
			}
		});
	</script>

</body>
</html>

Default Options

  {
   wrapper: null,
		selectStates: [],
		cssFill: {
			shape: "#D8D6D6",
			icon_state: "#BBBBBB",
			label_icon_state: "#777777",
			label_state: "#FFFFFF",
			selected: "#BBBBBB"
		},
		responsive: true,
		width: 500,
		callbacks: {
			click: function (element, uf) { },
			mouseover: function (element, uf) { }
		}
  }

Browser support

Safari Firefox Chrome IE8 IE9 IE10
✖†

brmap's People

Contributors

libnando avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.