Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dpayk committed Sep 23, 2015
1 parent 69980ae commit 40dffb1
Show file tree
Hide file tree
Showing 18 changed files with 1,310 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target/*
.idea/*
*.iml
nbactions.xml
/build.properties
13 changes: 13 additions & 0 deletions apache2-license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (C) ${project.inceptionYear} ${owner} (${email})

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
756 changes: 756 additions & 0 deletions pom.xml

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/main/js/apps/sample/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (C) 2015 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define(["dojo/i18n!./nls/bundle"], {});
62 changes: 62 additions & 0 deletions src/main/js/apps/sample/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"load": {
"bundleLocations": ["localbundles", "bundles"],
"allowedBundles": [
"system",
"splashscreen",
"map",
"themes",
"templates",
"templatelayout",
"windowmanager",
"toolset",
"toolrules",
"content_office_locations"
]
},
"bundles": {
"map": {
"MapState": {
"initialExtent": {
"xmin": -1100000,
"ymin": 4000000,
"xmax": 3500000,
"ymax": 8800000,
"spatialReference": {
"wkid": 3857
}
}
},
"MapModelFactory": {
"_configData": {
"maps": [
{
"id": "default",
"glass_pane": [],
"operationalLayer": [],
"baseLayer": [
{
"id": "background1",
"title": "Image",
"service": "worldimage",
"enabled": true
}
]
}
]
}
},
"MappingResourceRegistryFactory": {
"_knownServices": {
"services": [
{
"id": "worldimage",
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",
"type": "AGS_TILED"
}
]
}
}
}
}
}
24 changes: 24 additions & 0 deletions src/main/js/apps/sample/nls/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (C) 2015 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define({
root: {
service: {
streets: "Streets",
topo: "Topography"
}
},
de: true
});
21 changes: 21 additions & 0 deletions src/main/js/apps/sample/nls/de/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (C) 2015 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define({
service: {
streets: "Stra\u00DFen",
topo: "Topographie"
}
});
25 changes: 25 additions & 0 deletions src/main/js/apps/sample/services-init.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"maps" :[
{
"id": "default",
"glass_pane" : [],
"operationalLayer" : [],
"baseLayer" : [
{
"id": "background1",
"title": "${service.streets}",
"service": "streets",
"layers" : ["*"],
"enabled" : true
},
{
"id": "background3",
"title": "${service.topo}",
"service": "worldTopo",
"layers" : ["*"],
"enabled" : false
}
]
}
]
}
14 changes: 14 additions & 0 deletions src/main/js/apps/sample/services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"services": [
{
"id":"worldTopo",
"type":"AGS_TILED",
"url":"http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
},
{
"id":"streets",
"type":"AGS_TILED",
"url":"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
}
]
}
60 changes: 60 additions & 0 deletions src/main/js/bundles/content_office_locations/MapContentAdder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (C) 2015 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

define([
"dojo/_base/declare",
"ct/mapping/map/MapModelInitializer",
"ct/mapping/mapcontent/MappingResourceRegistryInitializer"
], function (declare, MapModelInitializer, MappingResourceRegistryInitializer) {
return declare([], {
activate: function () {
// read service settings from properties
var properties = this._properties;
var service = properties.service;

var mrr = this._mappingResourceRegistry;
var serviceRef = service.id;
var tmp = {
services: [service]
};
var mrrInitializer = new MappingResourceRegistryInitializer();
mrrInitializer.initFromData(tmp, mrr);

var mapModelDesc = {
operationalLayer: [{
layers: ["*"],
service: serviceRef,
enabled: true,
id: serviceRef
}]
};
var mmi = new MapModelInitializer();
var mapModel = this._mapModel;
mmi.initMapModelFromData(mapModelDesc, mrr, mapModel);
},
deactivate: function () {
var properties = this._properties;
var service = properties.service;
var id = service.id;
var mapModel = this._mapModel;
mapModel.removeNodeById(id);
var mrr = this._mappingResourceRegistry;
var resource = mrr.getMappingResourceByUniqueId(id);
mrr.removeMappingResource(resource);
mapModel.fireModelStructureChanged({src: this});
}
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2015 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

define([
"dojo/_base/declare"
], function (declare) {
return declare([], {
activate: function () {
var properties = this._properties;
var storeDef = properties.storeDef;
this._store = this._agsStoreFactory.newInstance(storeDef);
},
deactivate: function () {
this._store.dispose();
this._store = null;
}
});
});
Loading

0 comments on commit 40dffb1

Please sign in to comment.