MapTilerLayer
A simple library which adds easy support for Overlay to Google Maps API. It also adds a simple Opacity Control for use with Google Maps, which allows you to change the opacity of your tile overlay and simple geolocation control.
The easiest way to prepare map for Google Maps overlay is to use MapTiler Engine.
Reference
klokantech.MapTilerMapType(map, tileurl, opt_bounds, opt_minZoom, opt_maxZoom, opt_dontAdd)
Params
- map {
google.maps.Map
} Map object. - tileurl {
function
} function(number, number, number) Function which returns url to tile. - opt_bounds {
google.maps.LatLngBounds
} Overlay bounds. - opt_minZoom {
number
} Minimal zoom of layer. - opt_maxZoom {
number
} Maximal zoom of layer. - opt_dontAdd {
boolean
} Layer should be created but not added to the map.
Methods
- getTile(tileCoord, zoom, ownerDocument)
- setOpacity(value) Sets opacity to value
<0,1>
klokantech.OpacityControl(map, layer, opacity)
Params
- map {
google.maps.Map
} Map object. - layer {
Object
} Layer for opacity change. - opacity {
number
} Default opacity of layer.
Methods
- setOpacity(value) Sets opacity to value
<0,1>
klokantech.GeolocationControl(map, opt_maxZoom, opt_controlPosition)
Params
- map {
google.maps.Map
} Map object. - opt_zoom {
number
} Zoom to use when first position is obtained. - opt_controlPosition {
google.maps.ControlPosition
}
Learn more
Checkout the example Two overlays on GoogleMaps with Opacity Control
On this page