~shikharkohli/sahana-eden/gsoc1

« back to all changes in this revision

Viewing changes to views/gis/ol_functions.js

  • Committer: Shikhar Kohli
  • Date: 2010-08-11 18:40:09 UTC
  • mfrom: (802.1.156 eden)
  • Revision ID: shikharkohli@gmail.com-20100811184009-yy8zag5dowlam0ip
Merge trunk and update (a bit) of JS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// General functions usable by all Layers
2
 
 
3
 
// Report Errors to a DIV
4
 
function ReportErrors(div,text) {
5
 
     $(div).innerHTML = text;
6
 
}
7
 
// For OSM File layers
8
 
function on_feature_hover(feature) {
9
 
        var text ="<ul>";
10
 
        var type ="way";
11
 
        if (feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
12
 
            type = "node";
13
 
        }    
14
 
        text += "<li>" + feature.osm_id + ": <a href='http://www.openstreetmap.org/api/0.5/"+type + "/" + feature.osm_id + "'>API</a></li>";
15
 
        for (var key in feature.attributes) {
16
 
            text += "<li>" + key + ": " + feature.attributes[key] + "</li>";
17
 
        }
18
 
        text += "</ul>";
19
 
        $("status_osm").innerHTML = text;
20
 
}