Skip to content

Commit

Permalink
fixing code style, changing tabs to spaces, fixing popup for single f…
Browse files Browse the repository at this point in the history
…eature, removing fix to auto-close popups
  • Loading branch information
volpino committed Dec 11, 2011
1 parent 3244fc6 commit 6e34803
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 252 deletions.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions georss.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@
}
timeline = new OpenLayers.Timeline({map: map,
timeline: "#timeline",
name_key: "title",
date_key: "published",
date_funct: ts_funct,
format: OpenLayers.Format.GeoRSSTimeline});

$.ajax({
type: "GET",
url: "flickr.xml",
url: "data/flickr.xml",
dataType: "xml",
success: function(data) {
$("#status").text("Data loaded");
Expand Down Expand Up @@ -63,7 +64,7 @@
<body>
<h1 id="title">OpenLayers Timeline GeoRSS Demo</h1>
<div id="container">
<p>You're are seeing the timeline of <a href="flickr.xml">this GeoRSS</a> taken from the GeoTagging group on Flickr</p>
<p>You're are seeing the timeline of <a href="data/flickr.xml">this GeoRSS</a> taken from the GeoTagging group on Flickr</p>
<p id="status">Loading...</p>
<div id="controls">
<input type="button" onclick="timeline.togglePlay();" value="Play/Pause" />
Expand Down
51 changes: 24 additions & 27 deletions kml.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,44 @@

function init(){
map = new OpenLayers.Map('map');
// layer = new OpenLayers.Layer.WMS("OpenLayers WMS",
// "http://vmap0.tiles.osgeo.org/wms/vmap0",
// {layers: 'basic'}, {numZoomLevels: 5});
// map.addLayer(layer);
var gsat = new OpenLayers.Layer.Google("Google Satellite", {
type: google.maps.MapTypeId.SATELLITE,
numZoomLevels: 17
});
map.addLayers([gsat]);
var gsat = new OpenLayers.Layer.Google("Google Satellite", {
type: google.maps.MapTypeId.SATELLITE,
numZoomLevels: 17
});
map.addLayers([gsat]);

map.setCenter(new OpenLayers.LonLat(174.785, -41.322).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()), 5);
// map.setCenter(new OpenLayers.LonLat(0, 0), 2);
map.setCenter(new OpenLayers.LonLat(174.785, -41.322).
transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()), 5);
var ts_funct = function(d) {
return ((new Date(d)).getTime() / 1000);
}

var in_options = {
'internalProjection': map.baseLayer.projection,
'externalProjection': new OpenLayers.Projection("EPSG:4326")
};
var kmlOptionsIn = OpenLayers.Util.extend({
extractAttributes: true,
extractStyles: true,
extractTracks: true,
trackAttributes: true,
maxDepth: 2
}, in_options);
var in_options = {
'internalProjection': map.baseLayer.projection,
'externalProjection': new OpenLayers.Projection("EPSG:4326")
};

var kml_options_in = OpenLayers.Util.extend({
extractAttributes: true,
extractStyles: true,
extractTracks: true,
trackAttributes: true,
maxDepth: 2
}, in_options);

timeline = new OpenLayers.Timeline({map: map,
timeline: "#timeline",
name_key: "name",
date_key: "published",
date_funct: ts_funct,
format: OpenLayers.Format.KML,
formatOptions: kmlOptionsIn,
format_options: kml_options_in,
timedelta: 60*60*24,
});

$.ajax({
type: "GET",
url: "nzemperor.kml",
url: "data/nzemperor.kml",
dataType: "kml",
success: function(data) {
$("#status").text("Data loaded");
Expand Down Expand Up @@ -88,7 +85,7 @@
<body>
<h1 id="title">OpenLayers Timeline KML Demo</h1>
<div id="container">
<p>You're are seeing the timeline of <a href="nzemperor.kml">nzemperor.com</a> by <a href="http://www.sirtrack.com">Sirtrack</a></p>
<p>You're are seeing the timeline of <a href="data/nzemperor.kml">nzemperor.com</a> by <a href="http://www.sirtrack.com">Sirtrack</a></p>
<p id="status">Loading...</p>
<div id="controls">
<input type="button" onclick="timeline.togglePlay();" value="Play/Pause" />
Expand Down
1 change: 0 additions & 1 deletion lib/OpenLayers.Format.GeoRSSTimeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ OpenLayers.Format.GeoRSSTimeline = OpenLayers.Class(OpenLayers.Format.GeoRSS, {
if (this.timestamp_funct) {
date = this.timestamp_funct(date);
}
console.log(date);
if (!this.first || this.first > date) {
this.first = date;
}
Expand Down
Loading

0 comments on commit 6e34803

Please sign in to comment.