Jon Atkins 85255f476b basemap cleanups
- updated Google, Bing and Yandex externals from https://github.com/shramov/leaflet-plugins
- also renamed Google file, removed internal hacks for INGRESS map type
- used external included file for Bing maps, instead of embedded in the plugin
- used Google map tile API to set the options for the INGRESS and 'Google Grey' map layers
2013-11-22 20:46:03 +00:00

54 lines
1.5 KiB
JavaScript

// ==UserScript==
// @id iitc-plugin-bing-maps
// @name IITC plugin: Bing maps
// @category Map Tiles
// @version 0.1.1.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the maps.bing.com map layers (
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
// @match http://www.ingress.com/intel*
// @grant none
// ==/UserScript==
@@PLUGINSTART@@
// PLUGIN START ////////////////////////////////////////////////////////
window.plugin.mapBing = function() {};
window.plugin.mapBing.setupBingLeaflet = function() {
@@INCLUDERAW:external/Bing.js@@
}
window.plugin.mapBing.setup = function() {
window.plugin.mapBing.setupBingLeaflet();
//set this to your API key
var bingApiKey = 'ArR2hTa2C9cRQZT-RmgrDkfvh3PwEVRl0gB34OO4wJI7vQNElg3DDWvbo5lfUs3p';
var bingTypes = {
'Road': "Road",
'Aerial': "Aerial",
'AerialWithLabels': "Aerial with labels",
};
for (type in bingTypes) {
var name = bingTypes[type];
var bingMap = new L.BingLayer(bingApiKey, {type: type, maxZoom:20});
layerChooser.addBaseLayer(bingMap, 'Bing '+name);
}
};
var setup = window.plugin.mapBing.setup;
// PLUGIN END //////////////////////////////////////////////////////////
@@PLUGINEND@@