ol3-google-maps/examples/watchoptions.html
2018-07-25 20:18:39 +02:00

29 lines
1.2 KiB
HTML

---
layout: example.html
title: Watch options
shortdesc: Example using watch options to enable/disable rendering in Google Maps.
docs: >
<p>
You can choose to let OL render the layers over the Google Maps
basemap. It will cause a visible lag when panning or zooming, but
it will eliminate any limitation of the library for that type of
layer.
</p>
<p>
In this example, you can enable and disable watching different
types of layers. When it's green, it means
Google Maps is allowed to render it when a Google Layer is visible.
When it's red, OpenLayers renders that layer type at all times.
</p>
---
<div id="map" class="map"></div>
<button id="toggleOSM" title="Toggle between OL and GMaps">Toggle between OL and GMaps</button>
<span id="toggleWatch">
<input id="toggleImage" type="checkbox" name="image" value="image" />
<label for="toggleImage">Watch Image layers</label>
<input id="toggleTile" type="checkbox" name="tile" value="tile" />
<label for="toggleTile">Watch Tile layers</label>
<input id="toggleVector" type="checkbox" name="vector" value="vector" />
<label for="toggleVector">Watch Vector layers</label>
</span>