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

View File

@@ -1,20 +1,20 @@
// NOCOMPILE
// this example uses turf.js for which we don't have an externs file.
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.GeoJSON');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.proj');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_proj_ from '../src/ol/proj.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
var source = new ol.source.Vector();
var source = new _ol_source_Vector_();
fetch('data/geojson/roads-seoul.geojson').then(function(response) {
return response.json();
}).then(function(json) {
var format = new ol.format.GeoJSON();
var format = new _ol_format_GeoJSON_();
var features = format.readFeatures(json);
var street = features[0];
@@ -38,19 +38,19 @@ fetch('data/geojson/roads-seoul.geojson').then(function(response) {
street.getGeometry().transform('EPSG:4326', 'EPSG:3857');
source.addFeature(street);
});
var vectorLayer = new ol.layer.Vector({
var vectorLayer = new _ol_layer_Vector_({
source: source
});
var rasterLayer = new ol.layer.Tile({
source: new ol.source.OSM()
var rasterLayer = new _ol_layer_Tile_({
source: new _ol_source_OSM_()
});
var map = new ol.Map({
var map = new _ol_Map_({
layers: [rasterLayer, vectorLayer],
target: document.getElementById('map'),
view: new ol.View({
center: ol.proj.fromLonLat([126.980366, 37.526540]),
view: new _ol_View_({
center: _ol_proj_.fromLonLat([126.980366, 37.526540]),
zoom: 15
})
});