Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions
+25 -25
View File
@@ -1,25 +1,25 @@
goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.Sphere');
goog.require('ol.View');
goog.require('ol.geom.Polygon');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.TileWMS');
goog.require('ol.source.Vector');
import _ol_Feature_ from '../src/ol/Feature.js';
import _ol_Map_ from '../src/ol/Map.js';
import _ol_Sphere_ from '../src/ol/Sphere.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_geom_Polygon_ from '../src/ol/geom/Polygon.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_TileWMS_ from '../src/ol/source/TileWMS.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
var vectorLayer4326 = new ol.layer.Vector({
source: new ol.source.Vector()
var vectorLayer4326 = new _ol_layer_Vector_({
source: new _ol_source_Vector_()
});
var vectorLayer3857 = new ol.layer.Vector({
source: new ol.source.Vector()
var vectorLayer3857 = new _ol_layer_Vector_({
source: new _ol_source_Vector_()
});
var map4326 = new ol.Map({
var map4326 = new _ol_Map_({
layers: [
new ol.layer.Tile({
source: new ol.source.TileWMS({
new _ol_layer_Tile_({
source: new _ol_source_TileWMS_({
url: 'https://ahocevar.com/geoserver/wms',
params: {
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
@@ -30,17 +30,17 @@ var map4326 = new ol.Map({
vectorLayer4326
],
target: 'map4326',
view: new ol.View({
view: new _ol_View_({
projection: 'EPSG:4326',
center: [0, 0],
zoom: 2
})
});
var map3857 = new ol.Map({
var map3857 = new _ol_Map_({
layers: [
new ol.layer.Tile({
source: new ol.source.TileWMS({
new _ol_layer_Tile_({
source: new _ol_source_TileWMS_({
url: 'https://ahocevar.com/geoserver/wms',
params: {
'LAYERS': 'ne:NE1_HR_LC_SR_W_DR',
@@ -51,21 +51,21 @@ var map3857 = new ol.Map({
vectorLayer3857
],
target: 'map3857',
view: new ol.View({
view: new _ol_View_({
center: [0, 0],
zoom: 2
})
});
var wgs84Sphere = new ol.Sphere(6378137);
var wgs84Sphere = new _ol_Sphere_(6378137);
var radius = 800000;
var x, y;
for (x = -180; x < 180; x += 30) {
for (y = -90; y < 90; y += 30) {
var circle4326 = ol.geom.Polygon.circular(wgs84Sphere, [x, y], radius, 64);
var circle4326 = _ol_geom_Polygon_.circular(wgs84Sphere, [x, y], radius, 64);
var circle3857 = circle4326.clone().transform('EPSG:4326', 'EPSG:3857');
vectorLayer4326.getSource().addFeature(new ol.Feature(circle4326));
vectorLayer3857.getSource().addFeature(new ol.Feature(circle3857));
vectorLayer4326.getSource().addFeature(new _ol_Feature_(circle4326));
vectorLayer3857.getSource().addFeature(new _ol_Feature_(circle3857));
}
}