Convenient subway map
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dst
.gitignore
.npmignore
LICENSE
README.md
_config.yml
package.json

README.md

yaMetro

alt text

How To Install

npm install --save https://github.com/Smart-Dragon/yaMetro/tarball/master

How To Use

Init

$("#metro_map").yaMetro();

Properties

currentCity - select city ("moscow", "spb"). Default is "moscow".

selectedOpacity - opacity of the map when the station is selected. Default is 0.2.

controlPanEnabled - if false, prevents the map from being dragged. It is enabled by default.

controlZoomEnabled - if false, disables zooming on the map. It is enabled by default.

Events

onStationSelected

$("#metro_map").yaMetro({
	onStationSelected : function(id,name){
		...
	}
});

onStationUnselected

$("#metro_map").yaMetro({
	onStationUnselected : function(id){
		...
	}
});

Methods

selectMetro

$("#metro_map").yaMetro('selectMetro',id,false);

unselectMetro

$("#metro_map").yaMetro('unselectMetro',id,false);

unselectAllMetro

$("#metro_map").yaMetro('unselectAllMetro',id,false);