Transformed
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.Overlay');
|
||||
goog.require('ol.View');
|
||||
goog.require('ol.geom.Point');
|
||||
goog.require('ol.layer.Tile');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.source.TileJSON');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Icon');
|
||||
goog.require('ol.style.Style');
|
||||
import _ol_Feature_ from '../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../src/ol/Map.js';
|
||||
import _ol_Overlay_ from '../src/ol/Overlay.js';
|
||||
import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_geom_Point_ from '../src/ol/geom/Point.js';
|
||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_TileJSON_ from '../src/ol/source/TileJSON.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Icon_ from '../src/ol/style/Icon.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
|
||||
|
||||
var iconFeature = new ol.Feature({
|
||||
geometry: new ol.geom.Point([0, 0]),
|
||||
var iconFeature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Point_([0, 0]),
|
||||
name: 'Null Island',
|
||||
population: 4000,
|
||||
rainfall: 500
|
||||
});
|
||||
|
||||
var iconStyle = new ol.style.Style({
|
||||
image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({
|
||||
var iconStyle = new _ol_style_Style_({
|
||||
image: new _ol_style_Icon_(/** @type {olx.style.IconOptions} */ ({
|
||||
anchor: [0.5, 46],
|
||||
anchorXUnits: 'fraction',
|
||||
anchorYUnits: 'pixels',
|
||||
@@ -29,25 +29,25 @@ var iconStyle = new ol.style.Style({
|
||||
|
||||
iconFeature.setStyle(iconStyle);
|
||||
|
||||
var vectorSource = new ol.source.Vector({
|
||||
var vectorSource = new _ol_source_Vector_({
|
||||
features: [iconFeature]
|
||||
});
|
||||
|
||||
var vectorLayer = new ol.layer.Vector({
|
||||
var vectorLayer = new _ol_layer_Vector_({
|
||||
source: vectorSource
|
||||
});
|
||||
|
||||
var rasterLayer = new ol.layer.Tile({
|
||||
source: new ol.source.TileJSON({
|
||||
var rasterLayer = new _ol_layer_Tile_({
|
||||
source: new _ol_source_TileJSON_({
|
||||
url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure',
|
||||
crossOrigin: ''
|
||||
})
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
var map = new _ol_Map_({
|
||||
layers: [rasterLayer, vectorLayer],
|
||||
target: document.getElementById('map'),
|
||||
view: new ol.View({
|
||||
view: new _ol_View_({
|
||||
center: [0, 0],
|
||||
zoom: 3
|
||||
})
|
||||
@@ -55,7 +55,7 @@ var map = new ol.Map({
|
||||
|
||||
var element = document.getElementById('popup');
|
||||
|
||||
var popup = new ol.Overlay({
|
||||
var popup = new _ol_Overlay_({
|
||||
element: element,
|
||||
positioning: 'bottom-center',
|
||||
stopEvent: false,
|
||||
|
||||
Reference in New Issue
Block a user