Not that I don't have anything else to do but...
My earthquake script shows a world map followed by an edited rss feed listing all those within a certain distance and emphasising those that occur within Bulgaria...
http://www.jerbils.info/saratoga/wxearthquake.php
I'm getting tired of invoking Google Earth/Wikimapia to enter the lat/long coordinates to see where they have occurred. Can anyone point me at some code that will enable me to just click on the coordinates in the item and pop-up a map showing the location? There are thousands for the reverse, i.e. click on a map to get coordinates.
Update: Oh, I forgot, I have a "where we are" script that invokes Earth via Wunderground. I can probably adapt that.
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Earthquake map pop-up
Moderator: daj
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Earthquake map pop-up
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Earthquake map pop-up
Well, I didn't do a popup I did a new tab.
http://www.jerbils.info/saratoga/wxearthquake.php
I'm not sure what source people use for earthquakes now. I have been using http://www.emsc-csem.org's RSS feed for a while.
If interested, I use the following (modified) template for formatting RSS feeds (excuse the comments, I have modified them to make them less objectionable)...
...and I invoke it and format it to three columns width using...
...and...
So, basically, I have my country (Bulgaria, in this instance) highlighted in red, boxed and with white text (you'll have to find that in the code to change it but it is pretty obvious) and the title of each event takes you to more detail while the lat/long is selectable and links you to Wikimapia.
http://www.jerbils.info/saratoga/wxearthquake.php
I'm not sure what source people use for earthquakes now. I have been using http://www.emsc-csem.org's RSS feed for a while.
If interested, I use the following (modified) template for formatting RSS feeds (excuse the comments, I have modified them to make them less objectionable)...
Code: Select all
/*
"DO WHAT THE F*** YOU WANT TO" PUBLIC LICENSE (WTFPL)
Version sqrt(-1), April, 2012
Copyright (C) 2012 WickedCoder <wickedcoder@hotmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE F*** YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE F*** YOU WANT TO.
*/
/*
USAGE:
<p id="feedPanel" rssurl="<url to RSS feed>"
feedcount="<number of feeds to display>">
*/
$(function () {
$("p#feedPanel").feedMe({
feedUrl: $("p#feedPanel").attr('rssurl'),
feedCount: $("p#feedPanel").attr('feedcount')
});
});
jQuery.fn.feedMe = function () {
var e = $(this[0]);
var args = arguments[0] || {};
$.ajax({
url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=' + args.feedCount + '&callback=?&q='
+ encodeURIComponent(args.feedUrl),
dataType: 'json',
crossDomain: 'false',
beforeSend: function () {
$(e).empty()
.append("<img style=\"float:left;padding-left:70px;\" src=\"../myPictures/blog-load.gif\" alt=\"loading feeds...\" />");
},
error: function () {
$(e).empty()
.append("<span style=\"float:left;font-size:x-small;padding-left:10px;\">An error occurred retrieving feeds.</span>");
},
success: function (data) {
items = data.responseData.feed.entries;
var html = '';
for (var i = 0; i < items.length; i++) {
html += "<table style=\"margin-left:0;margin-right:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden" /* set table to truncate contents to width */
if (items[i].title.search(/bulgaria/i) == -1) {
html += "\"><tr><td><a href='";
html += items[i].link + "' style=\"color:black;background-color:yellow"; /* color background yellow */
} else {
html += ";border:1px solid black;\"><tr><td><a href='"; /* unless Bulgaria then red and table border */
html += items[i].link + "' style=\"color:white;background-color:red";
}
html += ";font-size:9px\" target=\"_blank\">" + items[i].title + "</a>"; /* set link to open in new tab */
var opstring = items[i].content.replace(/(\r\n|\n|\r)/gm," "); /* get rid of linefeeds from the description */
var location = opstring.substring(opstring.lastIndexOf("Location</td><td>")+18,opstring.lastIndexOf("</td></tr><tr><td style")); /* extract lat/long of location */
var locparts = location.split(" "); /* break into array */
if (locparts[1] == "S") {locparts[0] = "-" + locparts[0];} /* if latitude South make it negative */
if (locparts[4] == "W") {locparts[3] = "-" + locparts[3];} /* if longitude West make it negative */
/* create link to wikimapia and surround lat/long */
opstring = opstring.replace(location,'<a href="http://www.wikimapia.org/#lang=en&lat=' + locparts[0] + '&lon=' + locparts[3] + '&z=11&m=w" target="_blank">' + location + '</a>');
opstring = opstring.replace(/margin-top:5px;font-size:11px/gi,"margin-top:0px;font-size:9px;line-height:1.6;") ; /* change cell content margin and font size */
html += opstring + "</td></tr></table>" ; /* tack the edited text onto the end of the html and close the table */
}
$(e).empty().append(html);
}
});
}
Code: Select all
<script src="rssyex.js" type="text/javascript"> </script>
<style>
.newspaper
{
-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and Chrome */
column-count:3;
-moz-column-gap: 3px;
-webkit-column-gap: 3px;
column-gap : 3px
width:820px;
}
.newspaper table {
-moz-column-break-inside: avoid;
-webkit-column-break-inside: avoid;
break-inside: avoid-column;
margin-left:auto;
margin-right:auto;
}
</style>
Code: Select all
<div class="newspaper" style="width:820px">
<p id="feedPanel" rssurl="http://www.emsc-csem.org/service/rss/rss.php?typ=emsc&min_lat=10&min_long=-30&max_long=65" feedcount="42" style="margin-top:0px" >
</div>PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Earthquake map pop-up
Oh, I just tried it with tor to see if other than my IP address worked and Wikimapia came up with 0/0 location. So, either that is a problem with tor or it means Wikimapia knows me and that is why it works for me.
Update: Well, it worked on my tablet via GSM so it is either a problem with tor or Wikimapia knows me on my tablet, too. Perhaps someone could check my link and tell me if Wikimapia works for them...
http://www.jerbils.info/saratoga/wxearthquake.php
Update: Well, it worked on my tablet via GSM so it is either a problem with tor or Wikimapia knows me on my tablet, too. Perhaps someone could check my link and tell me if Wikimapia works for them...
http://www.jerbils.info/saratoga/wxearthquake.php
Last edited by gluepack on Thu 12 Nov 2015 1:27 pm, edited 1 time in total.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Earthquake map pop-up
Thanks, must be a problem with tor.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau