Commit 9c57a95f authored by dmorley's avatar dmorley
Browse files


parent 53fa46c8
Show as: <a href="?mapview=true">Map</a> | <a href="/">Simple Table</a> | <a href="?advancedview=true">Advanced Table</a>
<div id="map" style="height:600px;"></div>
$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"];
$csv = array_map('str_getcsv', file('db/country_latlon.csv'));
foreach ($csv as $cords) {
if ($cords[0] == $country_code) {
$lat = $cords[1];
$long = $cords[2];
<script src=""></script>
<script src=""></script>
var map = new OpenLayers.Map('map');
map.addLayer(new OpenLayers.Layer.OSM());
map.addControl(new OpenLayers.Control.LayerSwitcher());
var layer = new OpenLayers.Layer.GeoRSS("Diaspora Pods", "/api.php?key=4r45tg&format=georss");
map.setCenter(new OpenLayers.LonLat(<?php echo $long;?>,<?php echo $lat?>).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()),4);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment