| 1 | LandgateConfig = new Vespucci.Configuration(); |
|---|
| 2 | |
|---|
| 3 | LandgateConfig.proxy = "/cgi-bin/proxy.cgi?url=", |
|---|
| 4 | LandgateConfig.wfsvUrl = "http://geo.openplans.org/geoserver/ows", |
|---|
| 5 | LandgateConfig.wmsUrl = [ |
|---|
| 6 | "http://geo.openplans.org/geoserver/gwc/service/wms" |
|---|
| 7 | ]; |
|---|
| 8 | |
|---|
| 9 | LandgateConfig.wmsOptions = { |
|---|
| 10 | layers: "topp:nyc_background", |
|---|
| 11 | bgcolor: '0xECECC6', |
|---|
| 12 | format: 'image/png8' |
|---|
| 13 | }; |
|---|
| 14 | |
|---|
| 15 | LandgateConfig.wfsLayerTypes = ["notes"]; |
|---|
| 16 | |
|---|
| 17 | LandgateConfig.featureClasses = { |
|---|
| 18 | "notes": Vespucci.Feature.Note, |
|---|
| 19 | "comments": Vespucci.Feature.Comment |
|---|
| 20 | }; |
|---|
| 21 | |
|---|
| 22 | LandgateConfig.featureDefaults = { |
|---|
| 23 | "notes": { |
|---|
| 24 | title: "Note", |
|---|
| 25 | content: "This is a note.", |
|---|
| 26 | typeid : 0 |
|---|
| 27 | } |
|---|
| 28 | }; |
|---|
| 29 | |
|---|
| 30 | LandgateConfig.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 | |
|---|
| 40 | LandgateConfig.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 | |
|---|
| 72 | LandgateConfig.addControls = { |
|---|
| 73 | "notes": Vespucci.GeometryType.Point |
|---|
| 74 | }; |
|---|
| 75 | |
|---|
| 76 | LandgateConfig.moveControls = { |
|---|
| 77 | "notes": Vespucci.GeometryType.Point |
|---|
| 78 | }; |
|---|
| 79 | |
|---|
| 80 | LandgateConfig.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 | |
|---|
| 166 | LandgateConfig.namespaceUri = "http://www.openplans.org/topp"; |
|---|
| 167 | LandgateConfig.namespace = "topp"; |
|---|
| 168 | |
|---|
| 169 | LandgateConfig.projection = "EPSG:900913"; |
|---|
| 170 | LandgateConfig.maxExtent = new OpenLayers.Bounds(-8264065.748928515, 4962874.707924211, -8202916.126311328, 4998532.581612859); |
|---|
| 171 | LandgateConfig.maxResolution = 38.21851413574219; |
|---|
| 172 | LandgateConfig.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] |
|---|
| 180 | LandgateConfig.defaultZoomLevel = 2; |
|---|
| 181 | |
|---|
| 182 | LandgateConfig.startInViewMode = false; |
|---|
| 183 | |
|---|
| 184 | LandgateConfig.margins = new OpenLayers.Bounds(0, 0, 0, 0); |
|---|
| 185 | LandgateConfig.popupMargins = new OpenLayers.Bounds(75, 0, 0, 35); |
|---|
| 186 | |
|---|
| 187 | LandgateConfig.peopleUrlPrefix = "http://design.livablestreets.com/people/"; |
|---|
| 188 | LandgateConfig.peopleUrlSuffix = "/profile"; |
|---|
| 189 | |
|---|
| 190 | LandgateConfig.notRegisteredUrl = "http://design.livablestreets.com/join"; |
|---|
| 191 | LandgateConfig.forgotCredentialsUrl = "http://design.livablestreets.com/forgot"; |
|---|
| 192 | |
|---|
| 193 | LandgateConfig.loginHandlerClass = Vespucci.LoginHandler.LivableStreets.Stage; |
|---|
| 194 | |
|---|
| 195 | var NYCMap; |
|---|
| 196 | |
|---|
| 197 | function loadNYCMap() { |
|---|
| 198 | NYCMap = new Vespucci.Application(LandgateConfig); |
|---|
| 199 | NYCMap.load(); |
|---|
| 200 | } |
|---|
| 201 | |
|---|