Guest User

Untitled

a guest
Oct 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. lat lon icon iconSize iconOffset title description
  2. 56.030325 14.4774116666667 http://www.medinsbiologi.se/hano/Foto.png -10.5,-25 102_1 UV-foto
  3.  
  4. var pois = new OpenLayers.Layer.Vector("Provpunkter",
  5. {
  6. projection: map.displayProjection,
  7. strategies: [new OpenLayers.Strategy.Fixed()],
  8. protocol: new OpenLayers.Protocol.HTTP(
  9. {
  10. url: "../poi/DynPOIHano.txt",
  11. format: new OpenLayers.Format.Text(
  12. {
  13. extractStyles: true,
  14. extractAttributes: true
  15. })
  16. })
  17. });
  18.  
  19. function hideFeatures() {
  20. var features = pois.features;
  21. for( var i = 0; i < features.length; i++ ) {
  22. features.style.display = 'none';
  23. }
  24. pois.redraw();
  25. }
  26.  
  27. $.each(pois.features, function (index, feature) {
  28. if ( feature.attributes.description == 'UV-foto' )
  29. feature.style.display = 'none';
  30. });
  31.  
  32. function hideFeatures() {
  33. var feature = pois.features;
  34. for( var i = 0; i < feature.length; i++ ) {
  35. if (feature[i].style.externalGraphic == "http://www.medinsbiologi.se/hano/ikon/Foto.png") {
  36. feature[i].style= { display: 'none' };
  37. }
  38. }
  39. pois.redraw();
  40. }
Add Comment
Please, Sign In to add comment