OpenLayers OpenLayers

Changeset 6796

Show
Ignore:
Timestamp:
04/04/08 18:48:12 (9 months ago)
Author:
tlpinney
Message:

Merged to trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/tlpinney/openlayers

    • Property svnmerge-integrated changed from /trunk/openlayers:1-6616 to /trunk/openlayers:1-6795
  • sandbox/tlpinney/openlayers/examples/popups.html

    r6617 r6796  
    7373         
    7474        function mousedown(evt) { 
    75              // check to see if the popup was hidden by the close box 
    76              // if so, then destroy it before continuing 
    77             if (popup != null) { 
    78                 if (!popup.visible()) { 
    79                     markers.map.removePopup(popup); 
    80                     popup.destroy(); 
    81                     popup = null; 
    82                 } 
    83             } 
    8475            if (popup == null) { 
    8576                popup = feature.createPopup(true); 
    86                 popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>"); 
     77                popup.setContentHTML("<div style='background-color:red; width:150;height:100'><a href='http://www.somethingconstructive.net' target='_blank'>click me</a></div>"); 
    8778                popup.setBackgroundColor("yellow"); 
    8879                popup.setOpacity(0.7); 
    8980                markers.map.addPopup(popup); 
    9081            } else { 
    91                 markers.map.removePopup(popup); 
    92                 popup.destroy(); 
    93                 popup = null; 
    94             } 
     82                popup.toggle(); 
     83               } 
    9584            OpenLayers.Event.stop(evt); 
    9685        }         
  • sandbox/tlpinney/openlayers/examples/select-feature-openpopup.html

    r6145 r6796  
    33    <title>Open Popup on Layer.Vector</title>  
    44    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 
     5    <link rel="stylesheet" href="../theme/default/framedCloud.css" type="text/css" /> 
    56    <style type="text/css"> 
    67        #map { 
     
    2122        function onFeatureSelect(feature) { 
    2223            selectedFeature = feature; 
    23             popup = new OpenLayers.Popup.Anchored("chicken",  
     24            popup = new OpenLayers.Popup.FramedCloud("chicken",  
    2425                                     feature.geometry.getBounds().getCenterLonLat(), 
    25                                      new OpenLayers.Size(250,75)
     26                                     null
    2627                                     "<div style='font-size:.8em'>Feature: " + feature.id +"<br />Area: " + feature.geometry.getArea()+"</div>", 
    2728                                     null, true, onPopupClose); 
  • sandbox/tlpinney/openlayers/examples/sld.html

    r6240 r6796  
    77            height: 475px; 
    88            border: 1px solid black; 
     9            background: #ccddff; 
    910        } 
    1011    </style> 
     
    1213    <script src="../lib/OpenLayers.js"></script> 
    1314    <script type="text/javascript"> 
    14         var lon = 5; 
    15         var lat = 40
    16         var zoom = 5
    17         var map, layer, gmlLayers, styles, waterStyle, hover; 
     15         
     16        var map, sld, gmlLayers
     17        var format = new OpenLayers.Format.SLD()
     18        function init() { 
    1819 
    19         function load(){ 
    20            OpenLayers.loadURL("tasmania/sld-tasmania.xml", "", null, init); 
     20            map = new OpenLayers.Map('map'); 
     21            map.addControl(new OpenLayers.Control.LayerSwitcher()); 
     22 
     23            OpenLayers.loadURL("tasmania/sld-tasmania.xml", null, null, complete); 
     24 
    2125        } 
    2226         
    23         function init(req){ 
    24             map = new OpenLayers.Map('map'); 
    25             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",  
    26                     "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); 
    27             map.addLayer(layer);            
    28                   map.zoomToExtent(