Guest User

Untitled

a guest
Apr 27th, 2012
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var quartiere = [
  2. { name:"Altenberg", url:"quartiere/Altenberg.kml" },
  3. { name:"Bethlehem", url:"quartiere/Bethlehem.kml" },
  4. { name:"Beundenfeld", url:"quartiere/Beundenfeld.kml" },
  5. { name:"Breitenrain", url:"quartiere/Breitenrain.kml" },
  6. { name:"Breitfeld", url:"quartiere/Breitfeld.kml" },
  7. { name:"Brunnadern", url:"quartiere/Brunnadern.kml" },
  8. { name:"Bümpliz", url:"quartiere/Bümpliz.kml" },
  9. { name:"Engeried", url:"quartiere/Engeried.kml" },
  10. { name:"Felsenau", url:"quartiere/Felsenau.kml" },
  11. { name:"gelbes Quartier", url:"quartiere/gelbes Quartier.kml" },
  12. { name:"grünes Quartier", url:"quartiere/grünes Quartier.kml" },
  13. { name:"Gryphenhübeli", url:"quartiere/Gryphenhübeli.kml" },
  14. { name:"Holligen", url:"quartiere/Holligen.kml" },
  15. { name:"Kirchenfeld", url:"quartiere/Kirchenfeld.kml" },
  16. { name:"Länggasse", url:"quartiere/Länggasse.kml" },
  17. { name:"Mattenhof", url:"quartiere/Mattenhof.kml" },
  18. { name:"Monbijou", url:"quartiere/Monbijou.kml" },
  19. { name:"Muesmatt", url:"quartiere/Muesmatt.kml" },
  20. { name:"Murifeld", url:"quartiere/Murifeld.kml" },
  21. { name:"Neufeld", url:"quartiere/Neufeld.kml" },
  22. { name:"rotes Quartier", url:"quartiere/rotes Quartier.kml" },
  23. { name:"Sandrain", url:"quartiere/Sandrain.kml" },
  24. { name:"Schlosshalde", url:"quartiere/Schlosshalde.kml" },
  25. { name:"Spitalacker", url:"quartiere/Spitalacker.kml" },
  26. { name:"Stadtbach", url:"quartiere/Stadtbach.kml" },
  27. { name:"Stöckacker", url:"quartiere/Stöckacker.kml" },
  28. { name:"Weissenbühl", url:"quartiere/Weissenbühl.kml" },
  29. { name:"weisses Quartier", url:"quartiere/weisses Quartier.kml" }
  30. ];
  31.  
  32. for (i = 0; i < quartiere.length; i++) {
  33.  
  34. map.addLayer( new OpenLayers.Layer.Vector(quartiere[i].name, {
  35. strategies: [new OpenLayers.Strategy.Fixed()],
  36. protocol: new OpenLayers.Protocol.HTTP({
  37. url: quartiere[i].url,
  38. format: new OpenLayers.Format.KML({
  39. extractStyles: true,
  40. extractAttributes: true,
  41. maxDepth: 2
  42. })
  43. })
  44. })
  45. );
  46. }
RAW Paste Data