Proposed Library Structure
Opened this issue · 0 comments
james-rae commented
Files
Directories under src
<root>
has the loader stuff, code that makes the library, type defsmap
has the map stufflayer
has the layer stuffutil
? (not sold on the name) contains stuff like symbology, query, etc.
Module Interface
.map
or.maps
provides functions to make maps. E.g.gapi.maps.createMap(configObj, divId): Map
gapi.maps.createOverviewMap(mainMap, divId): Map
(design up in the air, see #5 )gapi.maps.create3DMap(configObj, divId): Map3D
(next level enhancement)- thoughts on plural or singular for module name?
.layer
or.layers
provides functions to make layers. E.g.gapi.layers.createFeatureLayer(configObj): FeatureRecord
(or whatever Records get renamed to)- maybe have it config driven? i.e. one function, derives layer type from config. might make typescript less great
- open to how the util-ish things are structured
- current way would be
gapi.query.myFunc()
,gapi.symbology.otherFunc()
- grouping might be more consistent, but means more typing. e.g.
gapi.util.query.myFunc()
- current way would be
- a dev module for hackery? e.g.
gapi.dev.esriLoadApi()
to do plugin sorcery
Spam ideas below