Merge pull request #5166 from fredj/simplify_measure_example

Remove jquery dependency from measure example
This commit is contained in:
Frédéric Junod
2016-04-04 16:31:45 +02:00
2 changed files with 3 additions and 5 deletions

View File

@@ -5,8 +5,6 @@ shortdesc: Example of using the ol.interaction.Draw interaction to create a simp
docs: >
<p><i>NOTE: By default, length and area are calculated using the projected coordinates. This is not accurate for projections like Mercator where the projected meters do not correspond to meters on the ground. To get a standarized measurement across all projections, use the geodesic measures.</i></p>
tags: "draw, edit, measure, vector"
resources:
- https://code.jquery.com/jquery-1.11.2.min.js
---
<div id="map" class="map"></div>
<form class="form-inline">

View File

@@ -117,7 +117,7 @@ var pointerMoveHandler = function(evt) {
helpTooltipElement.innerHTML = helpMsg;
helpTooltip.setPosition(evt.coordinate);
$(helpTooltipElement).removeClass('hidden');
helpTooltipElement.classList.remove('hidden');
};
@@ -132,8 +132,8 @@ var map = new ol.Map({
map.on('pointermove', pointerMoveHandler);
$(map.getViewport()).on('mouseout', function() {
$(helpTooltipElement).addClass('hidden');
map.getViewport().addEventListener('mouseout', function() {
helpTooltipElement.classList.add('hidden');
});
var typeSelect = document.getElementById('type');