Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
dst
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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);