「MediaWiki:Kartographer.js」の版間の差分

削除された内容 追加された内容
 
 
16行目:
* - Adds tile layers (mapnik, mapquestopen, mapquest, landscape)
* - Adds overlays (traffic, maplabels, boundaries, hill, cycling, hiking)
* - Adds a control (top left) to show the Nearby Articles from enwikivoyage.
*
* HOW CAN YOU HELP ?
38 ⟶ 37行目:
var wv,
ready,
/* jscs:disable validateQuoteMarks, disallowQuotedKeysInObjects */
nearbyArticlesCfg = {
url: 'https://tools.wmflabs.org/wikivoyage/w/data/ja-articles.js',
thumbPath: '//upload.wikimedia.org/wikipedia/commons/thumb/'
},
/* jscs:disable validateQuoteMarks, disallowQuotedKeysInObjects */
maptiles = {
"OSM": {
175 ⟶ 170行目:
ready = ready || mw.loader.using( [ 'oojs-ui', 'ext.kartographer.wv' ] ).done( function () {
wv = mw.loader.require( 'ext.kartographer.wv' );
 
wv.NearbyArticles.setConfig( nearbyArticlesCfg );
 
$.each( maptiles, function ( i, tile ) {
203 ⟶ 196行目:
.datalayer( map.dataLayers )
.update();
// https://wikivoyage.toolforge.org/w/data/ja-articles.jsに情報がないため
// wvmap.nearby();
} );
} );