EQK Event Filter V 1.0
EQK Event Filter V 1.0 is a service provided as is without warranty. This is an experimental service and may be interrupted any time.
EQK Event filter uses the INGV RSS feed to filter earthquake events in a specified zone in the Italy region.
Please note that we do not store past events, but we only apply a filter to the live RSS stream (http://cnt.rm.ingv.it/rss.xml) provided by INGV. So if you receive the "No events" message please try to increase the minimum distance from the reference point (lat,lon and place).
Accepted URL parameters:You can access the EQK Event Filter with a normal web browser pointing on the url: http://www.zallocco.net/eqk/index.php. By default (without parameters) EQK Event Filter show all earthquakes in a range of 100Km from the centre of Piazza Duomo of L'Aquila (IT). You can alter the default behaviour using the following parameters:
- center=<don't care generally you can put "true"> : if this parameter is passed on the URL then the output will be centered in the browser using a <center> tag;
- usecolors=<don't care generally you can put "true"> : if this parameter is passed on the URL then the values in the table will be colored according to their intensity or distance with different shades of red;
- fontsize=<an integer value>[px] : if this parameter is passed on the URL then the content of the table and all other elements are shown using the specified font size. <integer> should be a valid integer value. The trailing "px" is optional;
- fontfamily=<a valid font family name> : if this parameter is passed on the URL then the content of the table and all other elements are shown using the specified font family. <fontname> should be a valid font family name eg. Arial, Tahoma, Times and so on;
- class=<your class name> : this parameter is valid only for HTML/JS output and is usable only if you use the <script> tecnique to show the events. This parameter defines the CSS class to apply to the table. By default the table have a CSS class called "SmallText".
- distance=<a valid floating point value>[Km] : with this parameter you can change the default behavior of the web service. For example, setting this parameter to 200.5 will be presented all the events that occurred at a distance of 200.5km from the reference point specified. The trailing "Km" is optional;
- place=<a string> : this parameter is used to change the name of the default reference point. This parameter is ignored if lat and lon are not specified;
- lat=<a valid floating point value> : with this parameter you can alter the latitude of the reference point. This parameter is ignored if place and lon are not specified;
- lon=<a valid floating point value> : with this parameter you can alter the longitude of the reference point. This parameter is ignored if lat and place are not specified;
- format=<HTML|XML|JS> : this parameter allows you to change the output format. The only possible values are HTML (default), XML or JS. If you use the XML format, then center, usecolors, fontsize and fontfamily are ignored. JS is experimental....see below. For Example: http://www.zallocco.net/eqk/index.php?format=XML&minmag=2 (if you have a white page please use the "view page source" option of your browser to view the XML source!!!) will display only events of magnitude greater or equal to 4 in XML format. Please note that browsers like IE or Firefox do not natively display XML files in XML format but they try to display it in HTML format anyway ignoring the XML tags. So to view the XML source you have to download the page or you have to use the "view page source" option of your browser.
- (NEW) minmag=<a valid floating point value> : with this parameter you can set the minimum magnitude you want to be displayed. Keep in mind that the XML data stream provided by INGV provides only events of magnitude greater than or equal to 2 and only in rare cases, events of lower magnitude. For Example: http://www.zallocco.net/eqk/index.php?minmag=3.2 will display only events with magnitude grater than or equal to 3.2.
HOW TO USE:You can use EQK Event Filter using an <iframe> or a <script> tag.
With iFrame you can specify all the needed parameter in the src param of the iframe tag.
In this example we see how to use an <IFRAME> with all possible parameters specified. In the example we redefine the landmark near the Vatican City in Rome.
Notice about AJAX users!Unfortunately there is no way to access a web service from one domain to another with an AJAX call. This is a security limit to avoid the problem of cross site scripting.
The only way is to implement a solution like the one proposed by Yahoo Developer Network (get a look here), using a php proxy locale to your domain!!