| | 74 | function updateExamples() { |
|---|
| | 75 | examples = { |
|---|
| | 76 | 'geojson':['GeoJSON', '{"type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }'], |
|---|
| | 77 | 'wkt':['WKT','LINESTRING(100 0, 101 1)'], |
|---|
| | 78 | 'gml':['GML','<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMember xmlns:gml="http://www.opengis.net/gml"><feature:features xmlns:feature="http://mapserver.gis.umn.edu/mapserver" fid="OpenLayers.Feature.Vector_18"><feature:geometry><gml:LineString><gml:coordinates decimal="." cs=", " ts=" ">100, 0 101, 1</gml:coordinates></gml:LineString></feature:geometry></feature:features></gml:featureMember></wfs:FeatureCollection>'], |
|---|
| | 79 | 'georss':['GeoRSS','<item xmlns="http://backend.userland.com/rss2"><title></title><description></description><georss:line xmlns:georss="http://www.georss.org/georss">0 100 1 101</georss:line></item>'], |
|---|
| | 80 | 'kml':['KML','<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>Exported on Sat Dec 15 2007 02:55:27 GMT-0500 (EST)</description><Placemark><name>OpenLayers.Feature.Vector_30</name><description>No description available</description><LineString><coordinates>100, 0 101, 1</coordinates></LineString></Placemark></Folder></kml>'] |
|---|
| | 81 | } |
|---|
| | 82 | var in_type = document.getElementById("in_formatType").value; |
|---|
| | 83 | var ex = OpenLayers.Util.getElement("example_area"); |
|---|
| | 84 | var th = OpenLayers.Util.getElement("type_head"); |
|---|
| | 85 | th.innerHTML = examples[in_type][0]; |
|---|
| | 86 | var str = examples[in_type][1]; |
|---|
| | 87 | str = str.replace(/>/g, '>\n'); |
|---|
| | 88 | ex.value = str; |
|---|
| | 89 | } |
|---|