Skip to content

Instantly share code, notes, and snippets.

var recordsToAdd = [],
numRecords = records.length;
function collectRecords(record) {
if (recordsToAdd) {
recordsToAdd.push(record);
}
--numRecords;
if (numRecords === 0) {
this.addLayers(recordsToAdd);
}
@@ -2,10 +2,11 @@ goog.provide('ol.control.Zoom');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.events.EventType');
+goog.require('ol.BrowserFeature');
goog.require('ol.Projection');
goog.require('ol.control.Control');
@ahocevar
ahocevar / docs-button.png
Last active August 29, 2015 14:09
buttons
docs-button.png
@ahocevar
ahocevar / submit-with-location.js
Last active August 29, 2015 14:09
Feedback form submission with Geolocation
var featureType, featureNS;
var form = document.forms[0];
var geolocation = new ol.Geolocation({
projection: 'EPSG:4326'
});
geolocation.setTracking(true);
// Stop tracking once we have a position
geolocation.on('change', function(evt) {
geolocation.setTracking(false);
});
@ahocevar
ahocevar / map.geojson
Created July 9, 2015 12:42
gist from regional-monitoring app
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created July 9, 2015 12:43
gist from regional-monitoring app
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created July 9, 2015 12:44
gist from regional-monitoring app
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created July 9, 2015 12:52
gist from regional-monitoring app
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created July 10, 2015 07:17
gist from regional-monitoring app
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ahocevar
ahocevar / map.geojson
Created July 10, 2015 08:24
gist from regional-monitoring app
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.