supports this project: https://codepen.io/jwasilgeo/pen/wQVXep
data sources:
- https://en.wikipedia.org/wiki/Longest_flights#Longest_passenger_flights, accessed in October 2018
- hand-made airport point locations topojson
supports this project: https://codepen.io/jwasilgeo/pen/wQVXep
data sources:
def convert_feature_class_to_features_list(source_feature_class): | |
# convert feature class features to Esri features list | |
# (JSON represented as a list of feature dictionaries) | |
# ignore 'Geometry' field type and manually ask for JSON-formatted geometry with 'SHAPE@JSON' below | |
# you could also add the 'OID' field type to ignore if you need to add these features to a hosted feature service | |
field_types_to_ignore = ['Geometry'] | |
# establish the out fields, minus any fields that need to be ignored | |
out_fields = [ |
license: gpl-3.0 | |
height: 600 | |
border: no |
license: gpl-3.0 | |
border: no |
license: gpl-3.0 | |
height: 600 | |
border: no |
license: gpl-3.0 | |
height: 600 | |
border: no |
license: gpl-3.0 | |
height: 600 | |
border: no |
Clone the starter repo AngularClass/angular2-webpack-starter and then cd
into your local directory.
Install angular2-esri-loader
npm install angular2-esri-loader --save
# optional, if you want type support in your IDE for JSAPI 4.x
npm install @types/arcgis-js-api --save-dev
function createModulesObject(modulePaths, modules) { | |
const targetObject = {}; | |
modulePaths.forEach(function(modulePathString, idx) { | |
_createNestedProperties(modulePathString.split('/'), targetObject, modules[idx]); | |
}); | |
return targetObject; | |
} | |
function _createNestedProperties(modulePathArray, targetObject, moduleToAssign) { | |
const modulePathPart = modulePathArray.shift(); |