Sha256: 808b6b1182331f004c62ed54315b89b1949bcfa1cf01699ca12620b061300fcc

Contents?: true

Size: 880 Bytes

Versions: 42

Compression:

Stored size: 880 Bytes

Contents

GMaps.prototype.addMapType = function(mapTypeId, options) {
  if (options.hasOwnProperty("getTileUrl") && typeof(options["getTileUrl"]) == "function") {
    options.tileSize = options.tileSize || new google.maps.Size(256, 256);

    var mapType = new google.maps.ImageMapType(options);

    this.map.mapTypes.set(mapTypeId, mapType);
  }
  else {
    throw "'getTileUrl' function required.";
  }
};

GMaps.prototype.addOverlayMapType = function(options) {
  if (options.hasOwnProperty("getTile") && typeof(options["getTile"]) == "function") {
    var overlayMapTypeIndex = options.index;

    delete options.index;

    this.map.overlayMapTypes.insertAt(overlayMapTypeIndex, options);
  }
  else {
    throw "'getTile' function required.";
  }
};

GMaps.prototype.removeOverlayMapType = function(overlayMapTypeIndex) {
  this.map.overlayMapTypes.removeAt(overlayMapTypeIndex);
};

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
wbase-0.3.20 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.19 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.18 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.17 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.16 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.15 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.14 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.13 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.12 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.11 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.10 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.9 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.8 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.7 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.6 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.5 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.4 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.3 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.2 lib/vendor/admin/gmaps/lib/gmaps.map_types.js
wbase-0.3.1 lib/vendor/admin/gmaps/lib/gmaps.map_types.js