root/branches/landgate/LandgateConfig.js @ 810

Revision 765, 5.4 kB (checked in by sbenthall, 23 months ago)

landgate sandbox points to geo.openplans

Line 
1LandgateConfig = new Vespucci.Configuration();
2
3LandgateConfig.proxy =  "/cgi-bin/proxy.cgi?url=",
4LandgateConfig.wfsvUrl = "http://geo.openplans.org/geoserver/ows",
5LandgateConfig.wmsUrl = [
6    "http://geo.openplans.org/geoserver/gwc/service/wms"
7];
8
9LandgateConfig.wmsOptions = {
10                layers: "topp:nyc_background", 
11        bgcolor: '0xECECC6', 
12        format: 'image/png8'
13};
14
15LandgateConfig.wfsLayerTypes = ["notes"];
16
17LandgateConfig.featureClasses = {
18    "notes":    Vespucci.Feature.Note,
19    "comments": Vespucci.Feature.Comment
20};
21
22LandgateConfig.featureDefaults = {
23    "notes": {
24        title: "Note",
25        content: "This is a note.",
26        typeid : 0
27    } 
28};
29
30LandgateConfig.icons = [Vespucci.ImgPath + "ped.png", 
31                      Vespucci.ImgPath + "bike.png", 
32                      Vespucci.ImgPath + "elderly.png", 
33                      Vespucci.ImgPath + "kids.png",
34                      Vespucci.ImgPath + "publicspace.png",
35                      Vespucci.ImgPath + "traffic.png",
36                      Vespucci.ImgPath + "parking.png",
37                      Vespucci.ImgPath + "truck.png",
38                      Vespucci.ImgPath + "transit.png"];
39                                         
40LandgateConfig.featureStyles = {
41    "notes": {
42        externalGraphic: LandgateConfig.icons[0],
43        // Shadows taken out (for now) because they caused more problems then they solved.
44        backgroundGraphic: Vespucci.ImgPath + "project_shadow.png",
45        backgroundXOffset: 0,
46        backgroundYOffset: -23,
47        backgroundGraphicZIndex: 1,
48        graphicOpacity: 1,
49        // graphicYOffset is *almost* the height of the externalGraphic.
50        // -30 was chosen because it seemed to best match the feature's
51        // lonlat visually when the map was zoomed out.
52        graphicYOffset: -30, 
53        graphicZIndex: 10,
54        fillColor: "#ee9900",
55        fillOpacity: 0, 
56        hoverFillColor: "white",
57        hoverFillOpacity: 0,
58        strokeColor: "#ee9900",
59        strokeOpacity: 0,
60        strokeWidth: 1,
61        strokeLinecap: "round",
62        hoverStrokeColor: "red",
63        hoverStrokeOpacity: 0,
64        hoverStrokeWidth: 0.2,
65        pointRadius: 15,
66        hoverPointRadius: 1,
67        hoverPointUnit: "%",
68        pointerEvents: "visiblePainted"
69    }
70}
71
72LandgateConfig.addControls = {
73    "notes": Vespucci.GeometryType.Point
74};
75
76LandgateConfig.moveControls = {
77    "notes": Vespucci.GeometryType.Point
78};
79
80LandgateConfig.subtypes = {
81        "notes" : [
82                { //An object with the parameters for this subtype
83                        name : "Pedestrian",
84                        attributes : { // necessary and sufficient attributes for this subtype
85                                typeid : 0
86                        },
87                        style : { // OpenLayers styles to override default feature type styles
88                                externalGraphic : LandgateConfig.icons[0]
89                        }
90                },
91                {       
92                        name : "Cyclist",
93                        attributes : { 
94                                typeid : 1
95                        },
96                        style : {
97                                externalGraphic : LandgateConfig.icons[1]
98                        }
99                },
100                {       
101                        name : "Elderly",
102                        attributes : { 
103                                typeid : 2
104                        },
105                        style : {
106                                externalGraphic : LandgateConfig.icons[2]
107                        }
108                },
109                {       
110                        name : "Kids/Schools",
111                        attributes : { 
112                                typeid : 3
113                        },
114                        style : {
115                                externalGraphic : LandgateConfig.icons[3]
116                        }
117                },
118                {       
119                        name : "Public Space Opportunities",
120                        attributes : { 
121                                typeid : 4
122                        },
123                        style : {
124                                externalGraphic : LandgateConfig.icons[4]
125                        }
126                },
127                {       
128                        name : "Traffic",
129                        attributes : { 
130                                typeid : 5
131                        },
132                        style : {
133                                externalGraphic : LandgateConfig.icons[5]
134                        }
135                },
136                {       
137                        name : "Parking",
138                        attributes : { 
139                                typeid : 6
140                        },
141                        style : {
142                                externalGraphic : LandgateConfig.icons[6]
143                        }
144                },
145                {       
146                        name : "Trucks",
147                        attributes : { 
148                                typeid : 7
149                        },
150                        style : {
151                                externalGraphic : LandgateConfig.icons[7]
152                        }
153                },
154                {       
155                        name : "Transit",
156                        attributes : { 
157                                typeid : 8
158                        },
159                        style : {
160                                externalGraphic : LandgateConfig.icons[8]
161                        }
162                }
163        ] 
164};
165
166LandgateConfig.namespaceUri = "http://www.openplans.org/topp";
167LandgateConfig.namespace = "topp";
168
169LandgateConfig.projection = "EPSG:900913";
170LandgateConfig.maxExtent = new OpenLayers.Bounds(-8264065.748928515, 4962874.707924211, -8202916.126311328, 4998532.581612859);
171LandgateConfig.maxResolution = 38.21851413574219;
172LandgateConfig.overviewResolutions = [611.49622617187504, 305.74811308593752,
173                                    152.87405654296876, 76.43702827148438,
174                                    38.21851413574219, 19.109257067871095,
175                                    9.5546285339355475, 4.7773142669677737,
176                                    2.3886571334838869, 1.1943285667419434,
177                                    0.59716428337097172, 0.29858214168548586,
178                                    0.14929107084274293, 0.074645535421371464,
179                                    0.037322767710685732, 0.018661383855342866]
180LandgateConfig.defaultZoomLevel = 2;
181
182LandgateConfig.startInViewMode = false;
183
184LandgateConfig.margins = new OpenLayers.Bounds(0, 0, 0, 0);
185LandgateConfig.popupMargins = new OpenLayers.Bounds(75, 0, 0, 35);
186
187LandgateConfig.peopleUrlPrefix = "http://design.livablestreets.com/people/";
188LandgateConfig.peopleUrlSuffix = "/profile";
189
190LandgateConfig.notRegisteredUrl = "http://design.livablestreets.com/join";
191LandgateConfig.forgotCredentialsUrl = "http://design.livablestreets.com/forgot";
192
193LandgateConfig.loginHandlerClass = Vespucci.LoginHandler.LivableStreets.Stage;
194
195var NYCMap;
196       
197function loadNYCMap() {
198    NYCMap = new Vespucci.Application(LandgateConfig);
199    NYCMap.load();
200}
201       
Note: See TracBrowser for help on using the browser.