Merge pull request #5166 from fredj/simplify_measure_example
Remove jquery dependency from measure example
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user