1var current_boundary_id = 0; 2var esri_array_obj = null; 3var boundaries_jsonurl = ""; 4var lpb_param = ""; 5var point_featureLayer, 6 point_featureLayer2, 7 point_featureLayer3, 8 point_featureLayer4, 9 point_featureLayer5, 10 line_featureLayer; 11var hostdir = "https://gis.bavarikon.de/arcgis/rest/services/"; 12var mapfile = "WGS_Bayernkarte_gruppiert_v3_2_2"; // neuer Name für die Karte 13var is_tiled = false; 14var karte = hostdir + mapfile + "/MapServer"; 15var BayernExtent; 16 17var lpburl = ""; 18 19var ortslayers = [1, 2, 3, 4, 5, 6, 7, 8, 9]; 20var koerperschaftslayers_ohne_gmd = [27, 32]; 21 22var koerperschaftslayers_ohne_kfs = koerperschaftslayers_ohne_gmd; 23koerperschaftslayers_ohne_kfs.push[31]; 24 25var koerperschaftslayers_bis_kreisebene = koerperschaftslayers_ohne_gmd; 26koerperschaftslayers_bis_kreisebene.push[24]; 27 28var koerperschaftslayers = koerperschaftslayers_ohne_kfs; 29koerperschaftslayers.push([24]); 30 31var map, mqSubDomains, mqLayer; 32require([ 33 "esri/map", 34 "esri/layers/ArcGISDynamicMapServiceLayer", 35 "esri/layers/WebTiledLayer", 36 "esri/layers/FeatureLayer", 37 "esri/dijit/Attribution", 38 "esri/dijit/PopupTemplate", 39 "esri/request", 40 "esri/geometry/Point", 41 "esri/graphic", 42 "esri/geometry/Extent", 43 "esri/SpatialReference", 44 "esri/tasks/FindTask", 45 "esri/tasks/FindParameters", 46 "dojo/on", 47 "dojo/_base/array", 48 "dojo/domReady!", 49], function ( 50 Map, 51 ArcGISDynamicMapServiceLayer, 52 WebTiledLayer, 53 FeatureLayer, 54 Attribution, 55 PopupTemplate, 56 request, 57 Point, 58 Graphic, 59 Extent, 60 SpatialReference, 61 FindTask, 62 FindParameters, 63 on, 64 array 65) { 66 BayernExtent = new esri.geometry.Extent({ 67 xmin: 999241, 68 ymin: 5986275, 69 xmax: 1540620, 70 ymax: 6544655, 71 spatialReference: { wkid: 3857 }, 72 }); 73 74 parseQueryString(); 75 map = new Map("esrimap", { 76 //center: [11.80, 49.185], 77 //zoom: 7, 78 extent: BayernExtent, 79 sliderStyle: "large", 80 logo: false, 81 showAttribution: true, 82 minZoom: 1, 83 maxZoom: 18, 84 }); 85 86 map.attribution.destroy(); 87 var attribution = new Attribution( 88 { 89 map: map, 90 itemDelimiter: "|", 91 }, 92 "osmCopy" 93 ); 94 95 esri_array_obj = array; 96 97 /* var mqSubDomains = ["a","b","c"]; 98 var mqLayer = new esri.layers.WebTiledLayer( 99 "https://${subDomain}.tile.openstreetmap.org/${level}/${col}/${row}.png", 100 { 101 "id" : "mapQuest", 102 "subDomains": mqSubDomains, 103 "copyright" : 'Datenquelle: <img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://www.geodaten.bayern.de" target="_blank">Bayerische Vermessungsverwaltung</a>, ' 104 + '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://creativecommons.org/licenses/by/3.0/de/" target="_blank">CC-BY-3.0</a>; ' 105 + '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" />© <a href="https://www.openstreetmap.org/" target="_blank">OpenStreetMap</a>, ' 106 + '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://www.bsb-muenchen.de" target="_blank">BSB</a>, ' 107 + '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>' 108 } 109 ); 110 map.addLayer(mqLayer); */ 111 112 var mqSubDomains = ["a", "b"]; 113 var mqLayer = new esri.layers.WebTiledLayer( 114 "https://${subDomain}.tile.digitale-sammlungen.de/osm/${level}/${col}/${row}.png", 115 { 116 id: "mapQuest", 117 subDomains: mqSubDomains, 118 copyright: 119 'Datenquelle: <img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://www.geodaten.bayern.de" target="_blank">Bayerische Vermessungsverwaltung</a>, ' + 120 '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://creativecommons.org/licenses/by/3.0/de/" target="_blank">CC-BY-3.0</a>; ' + 121 '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" />© <a href="https://www.openstreetmap.org/" target="_blank">OpenStreetMap</a>, ' + 122 '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" />
122<a href="https://opendatacommons.org/licenses/odbl/" target="_blank">ODBL</a> ' + 123 '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://www.bsb-muenchen.de" target="_blank">BSB</a>, ' + 124 '<img width="8" height="10" border="0" alt="" src="/images/icons/externer_link_lpb.gif" class="extern_link" /><a href="https://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a>', 125 } 126 ); 127 map.addLayer(mqLayer); 128 129 var mylayer = new esri.layers.ArcGISDynamicMapServiceLayer(karte, { 130 id: "Bayern", 131 opacity: 0.8, 132 spatialReference: { wkid: 4326 }, 133 copyright: 134 'Datenquelle: <a href="https://www.geodaten.bayern.de" target="_blank">Bayerische Vermessungsverwaltung</a>, ' + 135 '<a href="https://creativecommons.org/licenses/by/3.0/de/" target="_blank">CC-BY-3.0</a>;', 136 }); 137 mylayer.setVisibleLayers([10, 23, 26, 29]); 138 map.addLayer(mylayer); 139 //alert(mylayer.showAttribution); 140 141 var myadditionallayer = new esri.layers.ArcGISDynamicMapServiceLayer(karte, { 142 id: "Bayern_Zusatz", 143 opacity: 0.8, 144 spatialReference: { wkid: 4326 }, 145 copyright: 146 'Datenquelle: <a href="https://www.geodaten.bayern.de" target="_blank">Bayerische Vermessungsverwaltung</a>, ' + 147 '<a href="https://creativecommons.org/licenses/by/3.0/de/" target="_blank">CC-BY-3.0</a>;', 148 }); 149 myadditionallayer.setVisibleLayers([0, 20]); 150 //map.addLayer(myadditionallayer); 151 152 map.on("ExtentChange", function (extent) { 153 var s = map.getLevel(); 154 if (s >= 11) { 155 visible = [-1]; 156 mylayer.setVisibleLayers(visible); 157 } 158 if (s < 11) { 159 visible = [10, 23, 26, 29]; 160 mylayer.setVisibleLayers(visible); 161 } 162 }); 163 //map.removeLayer(mqLayer); 164 165 var featureCollection = { 166 layerDefinition: null, 167 FeatureSet: { 168 features: [], 169 geometryType: "esriGeometryPoint", 170 }, 171 }; 172 featureCollection.layerDefinition = { 173 geometryType: "esriGeometryPoint", 174 objectIdField: "ObjectID", 175 drawingInfo: { 176 renderer: { 177 type: "simple", 178 symbol: { 179 type: "esriPMS", 180 url: "http://www.bsb-muenchen.de/fileadmin/imageswww/images140x70/digitale_sammlungen.gif", 181 contentType: "image/gif", 182 width: 14, 183 height: 7, 184 }, 185 }, 186 }, 187 fields: [ 188 { 189 name: "ObjectID", 190 alias: "ObjectID", 191 type: "esriFieldTypeOID", 192 }, 193 { 194 name: "description", 195 alias: "Description", 196 type: "esriFieldTypeString", 197 }, 198 { 199 name: "title", 200 alias: "Title", 201 type: "esriFieldTypeString", 202 }, 203 { 204 name: "haltepunkt", 205 alias: "Haltepunkt", 206 type: "esriFieldTypeString", 207 }, 208 { 209 name: "next", 210 alias: "Next", 211 type: "esriFieldTypeString", 212 }, 213 { 214 name: "previous", 215 alias: "Previous", 216 type: "esriFieldTypeString", 217 }, 218 ], 219 }; 220 221 //create a feature collection for the literature walks (polylines) 222 var line_featureCollection = { 223 layerDefinition: null, 224 FeatureSet: { 225 features: [], 226 geometryType: "esriGeometryPolyline", 227 }, 228 }; 229 line_featureCollection.layerDefinition = { 230 geometryType: "esriGeometryPolyline", 231 objectIdField: "ObjectID", 232 drawingInfo: { 233 renderer: { 234 type: "simple", 235 symbol: { 236 type: "esriSLS", 237 style: esri.symbol.SimpleLineSymbol.STYLE_DASH, 238 width: 4, 239 }, 240 }, 241 }, 242 fields: [ 243 { 244 name: "ObjectID", 245 alias: "ObjectID", 246 type: "esriFieldTypeOID", 247 }, 248 ], 249 }; 250 251 var popupTemplate = new esri.dijit.PopupTemplate({ 252 title: "{title}", 253 description: "{description}\n<br/>" + "{literaturportal}" + "{bild}" + "{desc}" + "{desctrip}", 254 }); 255 256 var popupTemplate_author = new esri.dijit.PopupTemplate({ 257 title: "{title}", 258 description: "{description}\n<br/>" + "{literaturportal}", 259 }); 260 261 point_featureLayer = new esri.layers.FeatureLayer(featureCollection, { 262 id: "LiteraturePOIs", 263 infoTemplate: popupTemplate, 264 }); 265 266 point_featureLayer.on("Click", function (evt) { 267 map.infoWindow.setFeatures([evt.graphic]); 268 }); 269 270 point_featureLayer2 = new esri.layers.FeatureLayer(featureCollection, { 271 id: "LiteraturePOIs2", 272 infoTemplate: popupTemplate, 273 }); 274 275 point_featureLayer2.on("Click", function (evt) { 276 map.infoWindow.setFeatures([evt.graphic]); 277 }); 278 279 point_featureLayer3 = new esri.layers.FeatureLayer(featureCollection, { 280 id: "LiteraturePOIs3", 281 infoTemplate: popupTemplate, 282 }); 283 284 point_featureLayer3.on("Click", function (evt) { 285 map.infoWindow.setFeatures([evt.graphic]); 286 }); 287 288 point_featureLayer4 = new esri.layers.FeatureLayer(featureCollection, { 289 id: "LiteraturePOIs4", 290 infoTemplate: popupTemplate, 291 }); 292 293 point_featureLayer4.on("Click", function (evt) { 294 map.infoWindow.setFeatures([evt.graphic]); 295 }); 296 297 point_featureLayer5 = new esri.layers.FeatureLayer(featureCollection, { 298 id: "LiteraturePOIs5", 299 infoTemplate: popupTemplate, 300 }); 301 302 point_featureLayer5.on("Click", function (evt) { 303 map.infoWindow.setFeatures([evt.graphic]); 304 }); 305 306 point_featureLayer6 = new esri.layers.FeatureLayer(featureCollection, { 307 id: "LiteraturePOIs6", 308 infoTemplate: popupTemplate_author, 309 }); 310 311 point_featureLayer6.on("Click", function (evt) { 312 map.infoWindow.setFeatures([evt.graphic]); 313 }); 314 315 line_featureLayer1 = new esri.layers.FeatureLayer(line_featureCollection, { 316 id: "AdminAreaBoundary1", 317 }); 318 319 line_featureLayer1.on("Click", function (evt) { 320 map.infoWindow.setFeatures([evt.graphic]); 321 }); 322 323 line_featureLayer2 = new esri.layers.FeatureLayer(line_featureCollection, { 324 id: "AdminAreaBoundary2", 325 }); 326 327 line_featureLayer2.on("Click", function (evt) { 328 map.infoWindow.setFeatures([evt.graphic]); 329 }); 330 331 line_featureLayer3 = new esri.layers.FeatureLayer(line_featureCollection, { 332 id: "AdminAreaBoundary3", 333 }); 334 335 line_featureLayer3.on("Click", function (evt) { 336 map.infoWindow.setFeatures([evt.graphic]); 337 }); 338 339 line_featureLayer4 = new esri.layers.FeatureLayer(line_featureCollection, { 340 id: "AdminAreaBoundary4", 341 }); 342 343 line_featureLayer4.on("Click", function (evt) { 344 map.infoWindow.setFeatures([evt.graphic]); 345 }); 346 347 line_featureLayer5 = new esri.layers.FeatureLayer(line_featureCollection, { 348 id: "AdminAreaBoundary5", 349 }); 350 351 line_featureLayer5.on("Click", function (evt) { 352 map.infoWindow.setFeatures([evt.graphic]); 353 }); 354 355 line_featureLayer6 = new esri.layers.FeatureLayer(line_featureCollection, { 356 id: "AdminAreaBoundary6", 357 }); 358 359 line_featureLayer6.on("Click", function (evt) { 360 map.infoWindow.setFeatures([evt.graphic]); 361 }); 362 363 line_featureLayer7 = new esri.layers.FeatureLayer(line_featureCollection, { 364 id: "AdminAreaBoundary7", 365 }); 366
367 line_featureLayer7.on("Click", function (evt) { 368 map.infoWindow.setFeatures([evt.graphic]); 369 }); 370 371 map.on("layers-add-result", function (results) { 372 requestLiteraturePointsOfInterest(); 373 }); 374 375 map.on("update-end", function () { 376 var level = map.getLevel(); 377 if (level < 8) { 378 hideAdminAreasBoundaries(); 379 } else { 380 showAdminAreaBoundary(); 381 } 382 }); 383 384 map.addLayers([ 385 line_featureLayer1, 386 line_featureLayer2, 387 line_featureLayer3, 388 line_featureLayer4, 389 line_featureLayer5, 390 line_featureLayer6, 391 line_featureLayer7, 392 point_featureLayer, 393 point_featureLayer2, 394 point_featureLayer3, 395 point_featureLayer4, 396 point_featureLayer5, 397 point_featureLayer6, 398 ]); 399 400 // ===================================================== 401 function parseQueryString() { 402 var params = []; 403 var QueryString = document.URL.split("?")[1]; 404 if (QueryString != "" && QueryString != undefined) { 405 params = QueryString.split("&"); 406 dojo.forEach(params, function (param) { 407 psplit = param.split("="); 408 pname = psplit[0]; 409 pvalue = psplit[1]; 410 if (pname == "x") x = pvalue; 411 if (pname == "y") y = pvalue; 412 if (pname == "long" || pname == "lon") lon = pvalue; 413 if (pname == "lat") lat = pvalue; 414 if (pname == "GKZ") { 415 GKZ = "" + pvalue; 416 if (!((GKZ.length == 6 && GKZ.match(/^[1-7]/)) || (GKZ.length == 8 && GKZ.match(/^09[1-7]/)))) GKZ = ""; 417 else if (GKZ.match(/\D/)) GKZ = ""; 418 else if (GKZ.length == 6) GKZ = "" + "09" + GKZ; 419 } 420 if (pname == "ODB_ID") { 421 ODB_ID = pvalue; 422 } 423 if (pname == "param") { 424 lpb_param = pvalue; 425 if (lpb_param == "ort" || lpb_param == "inst" || lpb_param == "all") { 426 } else lpb_param = "all"; 427 } 428 if (pname == "id") { 429 admin_area_id = pvalue; 430 } 431 }); 432 } 433 } 434 // ===================================================== 435 /* / ===================================================== 436 function resetExtentFromResults(results) { 437 var result, attribs, meineOBJECTID, GemeindeExtent, dummy; 438 439 dojo.forEach(results,function(result){ 440 441 attribs = result.feature.attributes; 442 meineOBJECTID = attribs.OBJECTID; 443 444 if (GemeindeExtent = result.feature.geometry.getExtent()) { 445 446 xmin = GemeindeExtent.xmin; xmax = GemeindeExtent.xmax; 447 ymin = GemeindeExtent.ymin; ymax = GemeindeExtent.ymax; 448 449 docenter = 1; 450 451 map.setExtent(GemeindeExtent); 452 var symbol_result = new esri.symbol.SimpleFillSymbol( 453 esri.symbol.SimpleFillSymbol.STYLE_SOLID, 454 new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, 455 new dojo.Color([55,55,55,0.8]), 3), 456 new dojo.Color([125,125,125,0.35]) 457 ); 458 var graphic = result.feature; 459 //graphic.setSymbol(symbol_result); 460 //map.graphics.add(graphic); 461 462 if ((graphic.attributes['Name'])!=(graphic.attributes['BEZ_GEM']) && graphic.attributes['Name']!= "Null") { 463 var font = new esri.symbol.Font("20px", esri.symbol.Font.STYLE_NORMAL, esri.symbol.Font.VARIANT_NORMAL, esri.symbol.Font.WEIGHT_BOLDER); 464 var labelPoint = GemeindeExtent.getCenter(); 465 var textSymbol = new esri.symbol.TextSymbol( 466 graphic.attributes['Name'], 467 font, new dojo.Color([0, 0, 0]) 468 ); 469 //var labelPointGraphic = new esri.Graphic(labelPoint,textSymbol); 470 //map.graphics.add(labelPointGraphic); 471 } 472 473 return; 474 } 475 else { 476 x = result.feature.attributes['GKrechts']; 477 y = result.feature.attributes['GKhoch']; 478 resetExtent(); 479 docenter=1; 480 return; 481 } 482 }); 483 } 484 // ===================================================== */ 485 486 // ===================================================== 487 /*function requestLiteraturePointsOfInterest_old(){ 488 489 if (lpb_param == undefined || !(lpb_param == 'inst' || lpb_param == 'ort') ) lpb_param = 'all'; 490 var requestHandle = esri.request( 491 { 492 url :"/json/getjson.php?oid=ODB_A00000000¶m="+lpb_param, 493 callbackParamName: "jsoncallback", 494 load: requestSucceededPointsOfInterest, 495 error: requestFailed 496 }, { 497 useProxy: false 498 } 499 ); 500 }*/ 501 // ===================================================== 502 function requestLiteraturePointsOfInterest() { 503 if ( 504 lpb_param == undefined || 505 !(lpb_param == "inst" || lpb_param == "gedenk" || lpb_param == "stadt" || lpb_param == "fest") 506 ) 507 lpb_param = "all"; 508 var requestHandle = esri.request( 509 { 510 url: "/json/getjson.php?oid=ODB_A00000000¶m=" + lpb_param, 511 callbackParamName: "jsoncallback", 512 load: requestSucceededPointsOfInterest, 513 error: requestFailed, 514 }, 515 { 516 useProxy: false, 517 } 518 ); 519 } 520 521 // ===================================================== 522 // ===================================================== 523 /*function requestSucceededPointsOfInterest_old(response) { 524 525 if (point_featureLayer.graphics.length) return; 526 if (point_featureLayer2.graphics.length) return; 527 if (point_featureLayer3.graphics.length) return; 528 529 var features = []; 530 var features2 = []; 531 var features3 = []; 532 533 var counter = 0; 534 535 var response_cp = response; 536 response_key = response_cp[0]; 537 538 array.forEach(response["poi"],function(station) { 539 540 longitude = station.gkh; 541 latitude = station.gkr; 542 543 if ( (station.gkh>100) && (station.gkr > 100)) { 544 var wgs84; 545 wgs84 = gk2geo(station.gkr, station.gkh); 546 latitude = wgs84['bp']; 547 longitude = wgs84['lp']; 548 } 549 550 var geometry = esri.geometry.geographicToWebMercator( 551 new esri.geometry.Point( 552 longitude, 553 latitude, 554 new esri.SpatialReference({"wkid":4326}) 555 ) 556 ); 557 558 var graphic = new esri.Graphic(geometry); 559 560 station.title = "Kategorie: " + (station.Kategorie?station.Kategorie:station.typ); 561 station.description = "<div class='popup_header'>" + station.name + "</div><br/>"; 562 563 station.literaturportal 564 = "<div class='popup_header'><a href ='" + lpburl 565 + ( 566 (station.typ=="Institution"?"institutionenlexikon?task=lpbinstitution.default&gkd=" + station.gkd 567 : (station.typ=="Station" ? "literaturland?type=trip&id=" + station.ds 568 : "ortelexikon?task=lpbplace.default&id=" + station.ds)) 569 ) 570 + "'>Beschreibung auf neuer Seite </a></div><br/>" 571 ; 572 573 station.homepage = ( station.webpage?"<a href = '"+station.webpage+"'>Homepage</a>":""); 574 station.bild = 575 ( station.params.imageurl 576 ?"<a href ='" + lpburl 577 + ((station.typ=="Institution"?"institutionenlexikon?task=lpbinstitution.default&gkd=" + station.gkd 578 : (station.typ=="Station" ? "literaturland?type=trip&id=" + station.ds 579 : "ortelexikon?task=lpbplace.default&id=" + station.ds)) 580 ) + "'>" + "<img src = '" + lpburl + station.params.imageurl + "'>'" + "</a>" 581 : "" 582 ); 583 584 graphic.setAttributes(station); 585 graphic.setSymbol( 586 new esri.symbol.PictureMarkerSymbol( 587 (station.typ=="Institution"?
587"/images/icons/library_blue.png" : 588 (station.typ=="Station" ? "/images/icons/jogging_red.png" 589 : "/images/icons/city_yellow.png")
589), 590 32, 591 37 592 ) 593 ); 594 595 station.typ=="Institution" ? features2.push(graphic) 596 : (station.typ=="Station" ? features3.push(graphic) 597 : features.push(graphic)) 598 599 old_longitude = longitude; 600 old_latitude = latitude; 601 old_geometry = geometry; 602 }); 603 604 point_featureLayer.applyEdits(features, null, null); 605 point_featureLayer2.applyEdits(features2, null, null); 606 point_featureLayer3.applyEdits(features3, null, null); 607 }*/ 608 // ===================================================== 609 function requestSucceededPointsOfInterest(response) { 610 if (point_featureLayer.graphics.length) return; 611 if (point_featureLayer2.graphics.length) return; 612 if (point_featureLayer3.graphics.length) return; 613 if (point_featureLayer4.graphics.length) return; 614 if (point_featureLayer5.graphics.length) return; 615 if (point_featureLayer6.graphics.length) return; 616 617 var features = []; 618 var features2 = []; 619 var features3 = []; 620 var features4 = []; 621 var features5 = []; 622 var features6 = []; 623 624 var counter = 0; 625 626 var response_cp = response; 627 response_key = response_cp[0]; 628 629 dojo.forEach(response["poi"], function (station) { 630 longitude = station.gkh; 631 latitude = station.gkr; 632 633 if (station.gkh > 100 && station.gkr > 100) { 634 var wgs84; 635 wgs84 = gk2geo(station.gkr, station.gkh); 636 latitude = wgs84["bp"]; 637 longitude = wgs84["lp"]; 638 } 639 640 var geometry = esri.geometry.geographicToWebMercator( 641 new esri.geometry.Point( 642 longitude, 643 latitude, 644 new esri.SpatialReference({ 645 wkid: 4326, 646 }) 647 ) 648 ); 649 650 var graphic = new esri.Graphic(geometry); 651 652 station.title = "Kategorie: " + (station.Kategorie ? station.Kategorie : station.typ); 653 654 station.description = 655 station.typ == "Autor" 656 ? "<div class='popup_header'>" + station.name + " (" + station.treffer + " Treffer)</div><br/>" 657 : "<div class='popup_header'>" + station.name + "</div><br/>"; 658 659 station.literaturportal = 660 "<div class='popup_header'><a href ='" + 661 lpburl + 662 (station.typ == "Institution" 663 ? "institutionenlexikon?task=lpbinstitution.default&gkd=" + station.gkd 664 : station.typ == "Festival" 665 ? "literaturkalender?task=lpbevent.default&id=" + station.ds 666 : station.typ == "Station" 667 ? "literaturland?type=trip&id=" + station.ds 668 : station.typ == "Autor" 669 ? "autorenlexikon?task=lpbauthorsbyplaces.default&oid=" + station.oid 670 : "ortelexikon?task=lpbplace.default&id=" + station.ds) + 671 "'>Beschreibung auf neuer Seite öffnen</a></div><br/>"; 672 station.homepage = station.webpage ? "<a href = '" + station.webpage + "'>Homepage</a>" : ""; 673 if (station.params != null) { 674 station.bild = station.params.imageurl 675 ? "<a href ='" + 676 lpburl + 677 (station.typ == "Institution" 678 ? "institutionenlexikon?task=lpbinstitution.default&gkd=" + station.gkd 679 : station.typ == "Festival" 680 ? "literaturkalender?task=lpbevent.default&id=" + station.ds 681 : station.typ == "Station" 682 ? "literaturland?type=trip&id=" + station.ds 683 : "ortelexikon?task=lpbplace.default&id=" + station.ds) + 684 "'>" + 685 "<img src = '" + 686 lpburl + 687 station.params.imageurl + 688 "'>" + 689 "</a>" 690 : ""; 691 } 692 graphic.setAttributes(station); 693 694 var pms = new esri.symbol.PictureMarkerSymbol( 695 station.typ == "Stadt" 696 ? "/images/icons/stadtportrait_klein.png" 697 : station.typ == "Festival" 698 ? "/images/icons/festivals_klein.png" 699 : station.typ == "Institution" 700 ? "/images/icons/institutionen_klein.png" 701 : station.typ == "Station" 702 ? "/images/icons/literarischer_weg_klein.png" 703 : station.typ == "Autor" 704 ? "/images/icons/autoren_klein_26x26.png" 705 : "/images/icons/gedenkort_klein2.png", 706 station.typ == "Autor" ? 26 : 32, 707 station.typ == "Autor" ? 26 : 32 708 ); 709 710 pms.setOffset(station.typ == "Autor" ? -2 : 0, station.typ == "Autor" ? 3 : 0); 711 712 graphic.setSymbol(pms); 713 714 station.typ == "Stadt" ? features.push(graphic) : features.push(graphic); 715 station.typ == "Institution" ? features2.push(graphic) : features.push(graphic);
716 station.typ == "Gedenk" ? features3.push(graphic) : features.push(graphic); 717 station.typ == "Festival" ? features4.push(graphic) : features.push(graphic); 718 station.typ == "Station" ? features5.push(graphic) : features.push(graphic); 719 station.typ == "Autor" ? features6.push(graphic) : features.push(graphic); 720 721 old_longitude = longitude; 722 old_latitude = latitude; 723 old_geometry = geometry; 724 }); 725 726 point_featureLayer.applyEdits(features, null, null); 727 point_featureLayer2.applyEdits(features2, null, null); 728 point_featureLayer3.applyEdits(features3, null, null); 729 point_featureLayer4.applyEdits(features4, null, null); 730 point_featureLayer5.applyEdits(features5, null, null); 731 point_featureLayer6.applyEdits(features6, null, null); 732 } 733 734 function requestFailed(error) { 735 alert("\n Fehler: " + error); 736 } 737 738 /* * / 739 function zoom2object(oid) { 740 alert(oid); 741 if (oid != "ODB_A00000000") { 742 var findTask, FindParams; 743 744 findTask = new esri.tasks.FindTask(karte); 745 FindParams = new esri.tasks.FindParameters(); 746 FindParams.returnGeometry = true; 747 748 FindParams.searchFields = ["ID"]; 749 FindParams.searchText = oid; 750 FindParams.layerIds = koerperschaftslayers; 751 FindParams.layerIds.push(ortslayers); 752 findTask.execute(FindParams,resetExtentFromResults); 753 754 map.graphics.clear(); 755 } 756 else { 757 map.setExtent(BayernExtent); 758 } 759 } 760 /* */ 761}); 762 763function rblist() { 764 jQuery.getJSON("/json/rb.json", function (tmp) { 765 jQuery.each(tmp["ODB_A00000000"], function (key, val) { 766 lklist(val.oid); 767 }); 768 }); 769} 770 771function lklist(oid) { 772 jQuery.getJSON("/json/lk.json", function (tmp) { 773 jQuery.each(tmp[oid], function (key, val) { 774 addon = ""; 775 if (val.typ == "kfs") { 776 addon = " (Kreisfreie Stadt)"; 777 } else if (val.typ == "lk") { 778 addon = " (Landkreis)"; 779 } 780 781 jQuery("#" + oid).append( 782 '<li><a href="#" class="uk-text-bold lpb-color-litland" onclick="javascript:zoom2object(\'' + 783 val.oid + 784 "');\">" + 785 val.name + 786 addon + 787 "</a></li>" 788 ); 789 }); 790 }); 791} 792/* 793require(["esri/tasks/FindTask","esri/tasks/FindParameters"],function(FindTask,FindParameters) { 794i*/ 795/*function zoom2object_old(oid) { 796 if (oid != "ODB_A00000000") { 797 var findTask, FindParams; 798 799 findTask = new esri.tasks.FindTask(karte); 800 FindParams = new esri.tasks.FindParameters(); 801 FindParams.returnGeometry = true; 802 803 FindParams.searchFields = ["ID"]; 804 FindParams.searchText = oid; 805 FindParams.layerIds = koerperschaftslayers; 806 FindParams.layerIds.push(ortslayers); 807 findTask.execute(FindParams,resetExtentFromResults); 808 809 map.graphics.clear(); 810 } 811 else { 812 map.setExtent(BayernExtent); 813 } 814}*/ 815//========================================================== 816function zoom2object(oid) { 817 if (oid != "ODB_A00000000") { 818 // $('"#' + oid + '"').toggleClass('show'); 819 jQuery("#litland_rb li div div").removeClass("show"); 820 jQuery("#litland_rb li div div") 821 .has("." + oid) 822 .addClass("show"); 823 824 jQuery("#litland_filter li ul li").removeClass("show"); 825 jQuery("#" + oid).toggleClass("show"); 826 827 var findTask, FindParams; 828 829 findTask = new esri.tasks.FindTask(karte); 830 831 FindParams = new esri.tasks.FindParameters(); 832 FindParams.returnGeometry = true; 833 834 FindParams.searchFields = ["ID"]; 835 FindParams.searchText = oid; 836 FindParams.layerIds = koerperschaftslayers; 837 FindParams.layerIds.push(ortslayers); 838 findTask.execute(FindParams, resetExtentFromResults); 839 map.graphics.clear(); 840 841 // show all layers but filter out other regierungsbezirke 842 point_featureLayer.setVisibility(true); 843 point_featureLayer2.setVisibility(true); 844 point_featureLayer3.setVisibility(true); 845 point_featureLayer4.setVisibility(true); 846 point_featureLayer5.setVisibility(true); 847 point_featureLayer6.setVisibility(true); 848 849 boundary_oid = oid; 850 loadAdminAreasBoundaries(oid); 851 } else { 852 map.setExtent(BayernExtent); 853 } 854} 855 856function loadAdminAreasBoundaries(oid) { 857 var protocol = window.location.protocol; 858 var hostname = window.location.hostname; 859 var url_to_json = protocol + "//" + hostname + "/gmaps/json/rb_" + oid + ".json"; 860 var line_features = []; 861 862 if ( 863 [ 864 "ODB_A00000001", 865 "ODB_A00001424", 866 "ODB_A00000900", 867 "ODB_A00001932", 868 "ODB_A00001695", 869 "ODB_A00000545", 870 "ODB_A00000224", 871 ].includes(oid) 872 ) { 873 jQuery.getJSON(url_to_json, function (json) { 874 var boundaries = new esri.geometry.Polyline(map.spatialReference); 875 var counter = 0;
876 esri_array_obj.forEach(json["boundary"], function (boundary) { 877 esri_array_obj.forEach(boundary, function (point) { 878 longitude = point[0]; 879 latitude = point[1]; 880 var wegpunkt = esri.geometry.geographicToWebMercator( 881 new esri.geometry.Point( 882 longitude, 883 latitude, 884 new esri.SpatialReference({ 885 wkid: 4326, 886 }) 887 ) 888 ); 889 if (counter++ > 0) { 890 boundaries.addPath([alter_wegpunkt, wegpunkt]); 891 } 892 alter_wegpunkt = wegpunkt; 893 }); 894 }); 895 var graphic = new esri.Graphic(boundaries); 896 graphic.setSymbol( 897 new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0, 1]), 4) 898 ); 899 line_features.push(graphic); 900 switch (oid) { 901 case "ODB_A00000001": 902 line_featureLayer1.applyEdits(line_features, null, null); 903 current_boundary_id = 1; 904 break; 905 case "ODB_A00001424": 906 line_featureLayer2.applyEdits(line_features, null, null); 907 current_boundary_id = 2; 908 break; 909 case "ODB_A00000900": 910 line_featureLayer3.applyEdits(line_features, null, null); 911 current_boundary_id = 3; 912 break; 913 case "ODB_A00001932": 914 line_featureLayer4.applyEdits(line_features, null, null); 915 current_boundary_id = 4; 916 break; 917 case "ODB_A00001695": 918 line_featureLayer5.applyEdits(line_features, null, null); 919 current_boundary_id = 5; 920 break; 921 case "ODB_A00000545": 922 line_featureLayer6.applyEdits(line_features, null, null); 923 current_boundary_id = 6; 924 break; 925 case "ODB_A00000224": 926 line_featureLayer7.applyEdits(line_features, null, null); 927 current_boundary_id = 7; 928 break; 929 } 930 hideAdminAreasBoundaries(); 931 }); 932 } 933} 934 935function showAdminAreaBoundary() { 936 if (document.getElementById("AdminAreaBoundary" + current_boundary_id + "_layer")) { 937 var is_current_boundary_visible = window 938 .getComputedStyle(document.getElementById("AdminAreaBoundary" + current_boundary_id + "_layer"), null) 939 .getPropertyValue("display"); 940 if (current_boundary_id != 0 && is_current_boundary_visible == "none") { 941 eval("line_featureLayer" + current_boundary_id).setVisibility(true); 942 } 943 } 944} 945 946function hideAdminAreasBoundaries() { 947 var mappingLayer = new Array( 948 line_featureLayer1, 949 line_featureLayer2, 950 line_featureLayer3, 951 line_featureLayer4, 952 line_featureLayer5, 953 line_featureLayer6, 954 line_featureLayer7 955 ); 956 mappingLayer.forEach(function (lyr) { 957 lyr.setVisibility(false); 958 }); 959} 960 961//========================================================= 962/* 963}); 964*/ 965/* / ===================================================== */ 966function resetExtentFromResults(results) { 967 var result, attribs, meineOBJECTID, GemeindeExtent, dummy; 968 969 dojo.forEach(results, function (result) { 970 attribs = result.feature.attributes; 971 meineOBJECTID = attribs.OBJECTID; 972 973 if ((GemeindeExtent = result.feature.geometry.getExtent())) { 974 xmin = GemeindeExtent.xmin; 975 xmax = GemeindeExtent.xmax; 976 ymin = GemeindeExtent.ymin; 977 ymax = GemeindeExtent.ymax; 978 979 docenter = 1; 980 981 map.setExtent(GemeindeExtent); 982 var symbol_result = new esri.symbol.SimpleFillSymbol( 983 esri.symbol.SimpleFillSymbol.STYLE_SOLID, 984 new esri.symbol.SimpleLineSymbol( 985 esri.symbol.SimpleLineSymbol.STYLE_SOLID, 986 new dojo.Color([55, 55, 55, 0.8]), 987 3 988 ), 989 new dojo.Color([125, 125, 125, 0.35]) 990 ); 991 var graphic = result.feature; 992 993 if (graphic.attributes["Name"] != graphic.attributes["BEZ_GEM"] && graphic.attributes["Name"] != "Null") { 994 var font = new esri.symbol.Font( 995 "20px", 996 esri.symbol.Font.STYLE_NORMAL, 997 esri.symbol.Font.VARIANT_NORMAL, 998 esri.symbol.Font.WEIGHT_BOLDER 999 ); 1000 var labelPoint = GemeindeExtent.getCenter(); 1001 var textSymbol = new esri.symbol.TextSymbol(graphic.attributes["Name"], font, new dojo.Color([0, 0, 0])); 1002 } 1003 1004 return; 1005 } else { 1006 x = result.feature.attributes["GKrechts"]; 1007 y = result.feature.attributes["GKhoch"]; 1008 resetExtent(); 1009 docenter = 1; 1010 return; 1011 } 1012 }); 1013} 1014/* / ===================================================== */ 1015//==============================00 1016function setMyLayer(lyr) { 1017 current_boundary_id = 0; 1018 var mappingLayer = new Array( 1019 point_featureLayer, 1020 point_featureLayer2, 1021 point_featureLayer3, 1022 point_featureLayer4, 1023 point_featureLayer5, 1024 point_featureLayer6 1025 ); 1026 1027 if (lyr == "stadtportrait") { 1028 // beide Icons : Städteportraits und literarische Orte, das Layer featureLayer enthält beide Icons 1029 // d.h. dem Layer featureLayer muà nur das Icon von Städteportraits zugewiesen werden 1030 //map.setExtent(BayernExtent); 1031 1032 if (jQuery("#litland_filter > .stadtportrait").hasClass("uk-active")) { 1033 mappingLayer.forEach(function (lyr) { 1034 lyr.setVisibility(true); 1035 }); 1036 } else { 1037 mappingLayer.forEach(function (lyr) { 1038 lyr.setVisibility(false); 1039 }); 1040 point_featureLayer.setVisibility(true); 1041 } 1042 1043 jQuery("#litland_filter li ul li").removeClass("show"); 1044 jQuery("#litland_rb li div div").removeClass("show"); 1045 jQuery("#liste_stadtportraits li").toggleClass("show"); 1046 1047 // Layer3 = Literarische Wege, Layer2 = Institutionen, Layer = Orte 1048 } 1049 1050 if (lyr == "gedenkort") { 1051 // beide Icons: Städteportraits und literarische Orte, das Layer featureLayer enthält beide Icons 1052 // d.h. dem Layer featureLayer muà nur das Icon von literarischen Orten zugewiesen werden 1053 //map.setExtent(BayernExtent); 1054 1055 if (jQuery("#litland_filter > .gedenkort").hasClass("uk-active")) { 1056 mappingLayer.forEach(function (lyr) { 1057 lyr.setVisibility(true); 1058 }); 1059 } else { 1060 mappingLayer.forEach(function (lyr) { 1061 lyr.setVisibility(false); 1062 }); 1063 point_featureLayer3.setVisibility(true); 1064 } 1065 1066 jQuery("#litland_filter li ul li").removeClass("show"); 1067 jQuery("#litland_rb li div div").removeClass("show"); 1068 jQuery("#liste_gedenkorte li").toggleClass("show"); 1069 } 1070 1071 if (lyr == "spaziergang") { 1072 // Icons sind RICHTIG 1073 //map.setExtent(BayernExtent); 1074 1075 if (jQuery("#litland_filter > .spaziergang").hasClass("uk-active")) { 1076 mappingLayer.forEach(function (lyr) { 1077 lyr.setVisibility(true); 1078 }); 1079 } else { 1080 mappingLayer.forEach(function (lyr) { 1081 lyr.setVisibility(false); 1082 }); 1083 point_featureLayer5.setVisibility(true); 1084 } 1085 1086 jQuery("#litland_filter li ul li").removeClass("show"); 1087 jQuery("#litland_rb li div div").removeClass("show"); 1088 jQuery("#liste_spaziergaenge li").toggleClass("show"); 1089 } 1090 1091 if (lyr == "institution") { 1092 // Icons sind RICHTIG 1093 //map.setExtent(BayernExtent); 1094 1095 if (jQuery("#litland_filter > .institution").hasClass("uk-active")) { 1096 mappingLayer.forEach(function (lyr) { 1097 lyr.setVisibility(true); 1098 }); 1099 } else { 1100 mappingLayer.forEach(function (lyr) { 1101 lyr.setVisibility(false); 1102 }); 1103 point_featureLayer2.setVisibility(true); 1104 } 1105 1106 jQuery("#litland_filter li ul li").removeClass("show"); 1107 jQuery("#litland_rb li div div").removeClass("show"); 1108 jQuery("#liste_institutionen li").toggleClass("show"); 1109 } 1110 1111 if (lyr == "festival") { 1112 // Icons für Festivals-Layer fehlen noch! 1113 //map.setExtent(BayernExtent); 1114 1115 if (jQuery("#litland_filter > .literaturkalender").hasClass("uk-active")) { 1116 mappingLayer.forEach(function (lyr) { 1117 lyr.setVisibility(true); 1118 }); 1119 } else { 1120 mappingLayer.forEach(function (lyr) { 1121 lyr.setVisibility(false); 1122 }); 1123 point_featureLayer4.setVisibility(true); // welches Layer ist für Festivals ? 1124 } 1125 1126 jQuery("#litland_filter li ul li").removeClass("show"); 1127 jQuery("#litland_rb li div div").removeClass("show"); 1128 jQuery("#liste_festivals li").toggleClass("show"); 1129 } 1130 1131 if (lyr == "autor") { 1132 //map.setExtent(BayernExtent); 1133 1134 if (jQuery("#litland_filter > .autor").hasClass("uk-active")) { 1135 mappingLayer.forEach(function (lyr) { 1136 lyr.setVisibility(true); 1137 }); 1138 } else { 1139 mappingLayer.forEach(function (lyr) { 1140 lyr.setVisibility(false); 1141 }); 1142 point_featureLayer6.setVisibility(true); 1143 } 1144 1145 jQuery("#litland_filter li ul li").removeClass("show"); 1146 jQuery("#litland_rb li div div").removeClass("show"); 1147 jQuery("#liste_regierungsbezirke li").toggleClass("show"); 1148 } 1149} 1150//=================================0000
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.