mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
[arcgis-js-api] Add support for v3 and v4 (#13951)
This commit is contained in:
committed by
Sheetal Nandi
parent
99ddd7b2e6
commit
5139d1074d
@@ -1,7 +1,5 @@
|
||||
|
||||
|
||||
import esri = require("esri");
|
||||
import Map = require("esri/map");
|
||||
import Map = require("esri/Map");
|
||||
import MapView = require("esri/views/MapView");
|
||||
import Point = require("esri/geometry/Point");
|
||||
|
||||
export = MapController;
|
||||
@@ -13,13 +11,20 @@ class MapController {
|
||||
}
|
||||
|
||||
start() {
|
||||
var point = new Point(-122.45, 37.75); // long, lat
|
||||
let point = new Point({
|
||||
latitude: 37.75,
|
||||
longitude: -122.45
|
||||
});
|
||||
|
||||
var mapOptions: esri.MapOptions = {};
|
||||
mapOptions.basemap = "topo";
|
||||
mapOptions.center = point;
|
||||
mapOptions.zoom = 13;
|
||||
|
||||
this.map = new Map(this.mapDiv, mapOptions);
|
||||
this.map = new Map({
|
||||
basemap: "topo"
|
||||
});
|
||||
|
||||
let view = new MapView({
|
||||
center: point,
|
||||
container: this.mapDiv,
|
||||
map: this.map,
|
||||
zoom: 13
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
25501
arcgis-js-api/index.d.ts
vendored
25501
arcgis-js-api/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
23
arcgis-js-api/v3/arcgis-js-api-tests.ts
Normal file
23
arcgis-js-api/v3/arcgis-js-api-tests.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import esri = require("esri");
|
||||
import Map = require("esri/map");
|
||||
import Point = require("esri/geometry/Point");
|
||||
|
||||
export = MapController;
|
||||
|
||||
class MapController {
|
||||
map: Map;
|
||||
|
||||
constructor(public mapDiv: string) {
|
||||
}
|
||||
|
||||
start() {
|
||||
let point = new Point(-122.45, 37.75); // long, lat
|
||||
|
||||
let mapOptions: esri.MapOptions = {};
|
||||
mapOptions.basemap = "topo";
|
||||
mapOptions.center = point;
|
||||
mapOptions.zoom = 13;
|
||||
|
||||
this.map = new Map(this.mapDiv, mapOptions);
|
||||
}
|
||||
}
|
||||
17892
arcgis-js-api/v3/index.d.ts
vendored
Normal file
17892
arcgis-js-api/v3/index.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
23
arcgis-js-api/v3/tsconfig.json
Normal file
23
arcgis-js-api/v3/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../../",
|
||||
"typeRoots": [
|
||||
"../../"
|
||||
],
|
||||
"types": [],
|
||||
"paths": {
|
||||
"arcgis-js-api": ["arcgis-js-api/v3"]
|
||||
},
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"arcgis-js-api-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user