From e30f267181d990947e67909de4809fa941698c85 Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Sat, 17 Oct 2015 21:36:38 +0200 Subject: Upgrading openlayers to 3.x --- misc/openlayers/examples/fusiontables.js | 51 -------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 misc/openlayers/examples/fusiontables.js (limited to 'misc/openlayers/examples/fusiontables.js') diff --git a/misc/openlayers/examples/fusiontables.js b/misc/openlayers/examples/fusiontables.js deleted file mode 100644 index 57ae6e5..0000000 --- a/misc/openlayers/examples/fusiontables.js +++ /dev/null @@ -1,51 +0,0 @@ -// change this to your api key -var apikey = "AIzaSyD_1zzMAoZjuP-m4LyhieuYmqiVJTEajyI"; - -var map = new OpenLayers.Map({ - div: "map", - layers: [ - new OpenLayers.Layer.OSM(), - new OpenLayers.Layer.Vector("Vectors", { - projection: new OpenLayers.Projection("EPSG:4326"), - strategies: [new OpenLayers.Strategy.Fixed()], - protocol: new OpenLayers.Protocol.Script({ - url: "https://www.googleapis.com/fusiontables/v1/query", - params: { - sql: "select * from 1g5DrXcdotCiO_yffkdW0zhuJk0a1i80SPvERHI8", - key: apikey - }, - format: new OpenLayers.Format.GeoJSON({ - ignoreExtraDims: true, - read: function(json) { - var row, feature, atts = {}, features = []; - var cols = json.columns; // column names - for (var i = 0; i < json.rows.length; i++) { - row = json.rows[i]; - feature = new OpenLayers.Feature.Vector(); - atts = {}; - for (var j = 0; j < row.length; j++) { - // 'location's are json objects, other types are strings - if (typeof row[j] === "object") { - feature.geometry = this.parseGeometry(row[j].geometry); - } else { - atts[cols[j]] = row[j]; - } - } - feature.attributes = atts; - // if no geometry, not much point in continuing with this row - if (feature.geometry) { - features.push(feature); - } - } - return features; - } - }) - }), - eventListeners: { - "featuresadded": function () { - this.map.zoomToExtent(this.getDataExtent()); - } - } - }) - ] -}); -- cgit v1.2.3