Git.Storage.Web/Theme/plugins/gmaps.js
(开头部分) 53KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* GMaps.js v0.2.30
* http://hpneo.github.com/gmaps/
*
* Copyright 2012, Gustavo Leon
* Released under the MIT License.
*/
if(window.google && window.google.maps){
var GMaps = (function(global) {
"use strict";
var doc = document;
var getElementById = function(id, context) {
var ele
if('jQuery' in global && context){
ele = $("#"+id.replace('#', ''), context)[0]
}else{
ele = doc.getElementById(id.replace('#', ''));
};
return ele;
};
var GMaps = function(options) {
var self = this;
var events_that_hide_context_menu = ['bounds_changed', 'center_changed', 'click', 'dblclick', 'drag', 'dragend', 'dragstart', 'idle', 'maptypeid_changed', 'projection_changed', 'resize', 'tilesloaded', 'zoom_changed'];
var events_that_doesnt_hide_context_menu = ['mousemove', 'mouseout', 'mouseover'];
window.context_menu = {};
if (typeof(options.el) === 'string' || typeof(options.div) === 'string') {
this.el = getElementById(options.el || options.div, options.context);
} else {
this.el = options.el || options.div;
};
this.el.style.width = options.width || this.el.scrollWidth || this.el.offsetWidth;
this.el.style.height = options.height || this.el.scrollHeight || this.el.offsetHeight;
this.controls = [];
this.overlays = [];
this.layers = []; // array with kml and ft layers, can be as many
this.singleLayers = {}; // object with the other layers, only one per layer
this.markers = [];
this.polylines = [];
this.routes = [];
this.polygons = [];
this.infoWindow = null;
this.overlay_el = null;
this.zoom = options.zoom || 15;
var markerClusterer = options.markerClusterer;
//'Hybrid', 'Roadmap', 'Satellite' or 'Terrain'
var mapType;
if (options.mapType) {
mapType = google.maps.MapTypeId[options.mapType.toUpperCase()];
}
else {
后面还有 1742 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
