From a2a61052fbb5338af941bd5baa7582753cdced06 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Tue, 24 May 2016 00:51:25 +0200 Subject: [PATCH] Check in Distance Finder as found in ancient SVN repo --- README | 27 + authors-transform.txt | 0 bootstrap.php | 22 + city-data/README | 11 + city-data/df_geocities.csv | 22909 ++++++ city-data/empty.csv | 0 city-data/geocities_more.csv | 132865 ++++++++++++++++++++++++++++++++ db-functions.php | 72 + distances.txt | 0 download.php | 21 + functions.php | 38 + get-location1.php | 27 + get-locations.php | 61 + index.php | 805 + install.php | 89 + javascript.js | 237 + map.php | 51 + save-location1.php | 20 + save-locations.php | 36 + styles.css | 15 + towns.txt | 3 + 21 files changed, 157309 insertions(+) create mode 100644 README create mode 100644 authors-transform.txt create mode 100644 bootstrap.php create mode 100644 city-data/README create mode 100644 city-data/df_geocities.csv create mode 100644 city-data/empty.csv create mode 100644 city-data/geocities_more.csv create mode 100644 db-functions.php create mode 100644 distances.txt create mode 100644 download.php create mode 100644 functions.php create mode 100644 get-location1.php create mode 100644 get-locations.php create mode 100644 index.php create mode 100644 install.php create mode 100644 javascript.js create mode 100644 map.php create mode 100644 save-location1.php create mode 100644 save-locations.php create mode 100644 styles.css create mode 100644 towns.txt diff --git a/README b/README new file mode 100644 index 0000000..c9dd24f --- /dev/null +++ b/README @@ -0,0 +1,27 @@ += Distance Finder = + +PHP script allowing users to find the air distance between cities. Uses information from Google if data not found in local database. + +== License == + +Distance Finder by Klaus-Uwe Mitterer is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/. + +Permissions beyond the scope of this license may be available at info@klaus-uwe.me. + +== Installation == + +Change the following settings in bootstrap.php: + +DB_HOST = The host on which your MySQL database is running. Usually localhost. +DB_NAME = The name of your MySQL database. +DB_USER = The user name for your MySQL database. +DB_PASSWORD = The corresponding password. +CSVFILE = The file you want to import to the database. Has to be in the following format: City name, Country code, State code, Population, Latitude, Longitude. Can be an empty file. Make sure this file exists in the same folder as the install.php + +Then go to http://yoursite.com/[subdirectory]/install.php and follow the instructions. Depending on the size of the CSV file you are importing into the database, this might take a while. + +When the installation has finished, you might want to remove or rename install.php. + +== Troubleshooting == + +If you keep getting empty files when trying to download the distance list, make sure that the web server has permissions to write in the folder (e.g. chown www-data:www-data) diff --git a/authors-transform.txt b/authors-transform.txt new file mode 100644 index 0000000..e69de29 diff --git a/bootstrap.php b/bootstrap.php new file mode 100644 index 0000000..706e968 --- /dev/null +++ b/bootstrap.php @@ -0,0 +1,22 @@ + $value){ + $fields[$name] = mysql_real_escape_string($value); + } + $query = sprintf("INSERT INTO `%s` (`%s`) VALUES ('%s')", $table, implode(array_keys($fields), '`,`'), implode($fields, "','")); + mysql_query($query) or dbLogError($query); +} + +function dbUpdate($table, $fields, $where=''){ + foreach($fields as $name => $value) { + $value = mysql_real_escape_string($value); + $fields[$name] = "`$name`='$value'"; + } + $query = sprintf("UPDATE `%s` SET %s %s", $table, implode($fields, ','), $where); + mysql_query($query) or dbLogError($query); +} + + diff --git a/distances.txt b/distances.txt new file mode 100644 index 0000000..e69de29 diff --git a/download.php b/download.php new file mode 100644 index 0000000..4546502 --- /dev/null +++ b/download.php @@ -0,0 +1,21 @@ + 'File exceeds upload_max_filesize', + 2 => 'File exceeds MAX_FILE_SIZE', + 3 => 'File only partially uploaded', + 4 => 'No file uploaded', + 6 => 'Missing temporary folder', + 7 => 'Disk write failed', + ); + + if ($_FILES['upload']['name']=='') { + return; + } + + if ($_FILES['upload']['error']) { + return $uploadErrorCodes[$_FILES['upload']['error']]; + } + + if(!move_uploaded_file($_FILES['upload']['tmp_name'], $newname)) { + return 'Server error. Could not move uploaded file.
'; + } + +} + + + + diff --git a/get-location1.php b/get-location1.php new file mode 100644 index 0000000..b53bc85 --- /dev/null +++ b/get-location1.php @@ -0,0 +1,27 @@ +adr = trim($_REQUEST['address']); +$location->id = ''; +$location->lat = ''; +$location->lng = ''; + +$row = dbGetRow("select * from df_locations where address='".dbEscape($location->adr)."'"); + +if(!$row and $_REQUEST['geosrc']=='db'){ + list($city, $countrycode) = explode(',', $location->adr); + $row = dbGetRow("select * from df_geocities where city='".dbEscape($city)."' and countrycode='".trim($countrycode)."' order by population desc limit 1 "); +} + +if($row){ + $location->id = $row->id; + $location->lat = $row->latitude; + $location->lng = $row->longitude; +} + +echo json_encode($location); + diff --git a/get-locations.php b/get-locations.php new file mode 100644 index 0000000..1685d8f --- /dev/null +++ b/get-locations.php @@ -0,0 +1,61 @@ +adr = $address; + $location->lat = ''; + $location->lng = ''; + $location->dst = ''; + $location->id = ''; + + $row = dbGetRow("select * from df_locations where address='".dbEscape($address)."' limit 1 "); + if($row){ + + $location->id = $row->id; + $location->lat = $row->latitude; + $location->lng = $row->longitude; + $location->dst = getDbDistance($locationId, $location->id); + + } + + if(!$row and $_REQUEST['geosrc']=='db'){ + + list($city, $countrycode) = explode(',', $address); + $row = dbGetRow("select * from df_geocities where city='".dbEscape($city)."' and countrycode='".trim($countrycode)."' order by population desc limit 1 "); + if($row){ + $location->lat = $row->latitude; + $location->lng = $row->longitude; + dbInsert('df_locations', array( + 'address' => formatAddress($address), + 'latitude' => $location->lat, + 'longitude' => $location->lng, + )); + $location->id = dbGetInsertId(); + } + + } + + $locations[] = $location; + +} + +echo json_encode($locations); + + + + + + + diff --git a/index.php b/index.php new file mode 100644 index 0000000..10771fb --- /dev/null +++ b/index.php @@ -0,0 +1,805 @@ +Address missing'; + } + + if (!$error) { + header('location: map.php?geosrc='.$_POST['geosrc'].'&address='.urlencode($address)); + exit; + } + +} + +?> + + + + + + + + + +

+ +
+ Enter address: (example: London, UK)

+ Geolocate addresses using + Google + Database +

Upload addresses file (optional) +

+
+ +
+

Country codes (ISO 3166-1 alpha-2)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeCountry Name
ADANDORRA
AEUNITED ARAB EMIRATES
AFAFGHANISTAN
AGANTIGUA AND BARBUDA
AIANGUILLA
ALALBANIA
AMARMENIA
AOANGOLA
AQANTARCTICA
ARARGENTINA
ASAMERICAN SAMOA
ATAUSTRIA
AUAUSTRALIA
AWARUBA
AXÅLAND ISLANDS
AZAZERBAIJAN
BABOSNIA AND HERZEGOVINA
BBBARBADOS
BDBANGLADESH
BEBELGIUM
BFBURKINA FASO
BGBULGARIA
BHBAHRAIN
BIBURUNDI
BJBENIN
BLSAINT BARTHÉLEMY
BMBERMUDA
BNBRUNEI DARUSSALAM
BOBOLIVIA, PLURINATIONAL STATE OF
BQBONAIRE, SINT EUSTATIUS AND SABA
BRBRAZIL
BSBAHAMAS
BTBHUTAN
BVBOUVET ISLAND
BWBOTSWANA
BYBELARUS
BZBELIZE
CACANADA
CCCOCOS (KEELING) ISLANDS
CDCONGO, THE DEMOCRATIC REPUBLIC OF THE
CFCENTRAL AFRICAN REPUBLIC
CGCONGO
CHSWITZERLAND
CICÔTE D'IVOIRE
CKCOOK ISLANDS
CLCHILE
CMCAMEROON
CNCHINA
COCOLOMBIA
CRCOSTA RICA
CUCUBA
CVCAPE VERDE
CWCURAÇAO
CXCHRISTMAS ISLAND
CYCYPRUS
CZCZECH REPUBLIC
DEGERMANY
DJDJIBOUTI
DKDENMARK
DMDOMINICA
DODOMINICAN REPUBLIC
DZALGERIA
ECECUADOR
EEESTONIA
EGEGYPT
EHWESTERN SAHARA
ERERITREA
ESSPAIN
ETETHIOPIA
FIFINLAND
FJFIJI
FKFALKLAND ISLANDS (MALVINAS)
FMMICRONESIA, FEDERATED STATES OF
FOFAROE ISLANDS
FRFRANCE
GAGABON
GBUNITED KINGDOM
GDGRENADA
GEGEORGIA
GFFRENCH GUIANA
GGGUERNSEY
GHGHANA
GIGIBRALTAR
GLGREENLAND
GMGAMBIA
GNGUINEA
GPGUADELOUPE
GQEQUATORIAL GUINEA
GRGREECE
GSSOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
GTGUATEMALA
GUGUAM
GWGUINEA-BISSAU
GYGUYANA
HKHONG KONG
HMHEARD ISLAND AND MCDONALD ISLANDS
HNHONDURAS
HRCROATIA
HTHAITI
HUHUNGARY
IDINDONESIA
IEIRELAND
ILISRAEL
IMISLE OF MAN
ININDIA
IOBRITISH INDIAN OCEAN TERRITORY
IQIRAQ
IRIRAN, ISLAMIC REPUBLIC OF
ISICELAND
ITITALY
JEJERSEY
JMJAMAICA
JOJORDAN
JPJAPAN
KEKENYA
KGKYRGYZSTAN
KHCAMBODIA
KIKIRIBATI
KMCOMOROS
KNSAINT KITTS AND NEVIS
KPKOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF
KRKOREA, REPUBLIC OF
KWKUWAIT
KYCAYMAN ISLANDS
KZKAZAKHSTAN
LALAO PEOPLE'S DEMOCRATIC REPUBLIC
LBLEBANON
LCSAINT LUCIA
LILIECHTENSTEIN
LKSRI LANKA
LRLIBERIA
LSLESOTHO
LTLITHUANIA
LULUXEMBOURG
LVLATVIA
LYLIBYA
MAMOROCCO
MCMONACO
MDMOLDOVA, REPUBLIC OF
MEMONTENEGRO
MFSAINT MARTIN (FRENCH PART)
MGMADAGASCAR
MHMARSHALL ISLANDS
MKMACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF
MLMALI
MMMYANMAR
MNMONGOLIA
MOMACAO
MPNORTHERN MARIANA ISLANDS
MQMARTINIQUE
MRMAURITANIA
MSMONTSERRAT
MTMALTA
MUMAURITIUS
MVMALDIVES
MWMALAWI
MXMEXICO
MYMALAYSIA
MZMOZAMBIQUE
NANAMIBIA
NCNEW CALEDONIA
NENIGER
NFNORFOLK ISLAND
NGNIGERIA
NINICARAGUA
NLNETHERLANDS
NONORWAY
NPNEPAL
NRNAURU
NUNIUE
NZNEW ZEALAND
OMOMAN
PAPANAMA
PEPERU
PFFRENCH POLYNESIA
PGPAPUA NEW GUINEA
PHPHILIPPINES
PKPAKISTAN
PLPOLAND
PMSAINT PIERRE AND MIQUELON
PNPITCAIRN
PRPUERTO RICO
PSPALESTINIAN TERRITORY, OCCUPIED
PTPORTUGAL
PWPALAU
PYPARAGUAY
QAQATAR
RERÉUNION
ROROMANIA
RSSERBIA
RURUSSIAN FEDERATION
RWRWANDA
SASAUDI ARABIA
SBSOLOMON ISLANDS
SCSEYCHELLES
SDSUDAN
SESWEDEN
SGSINGAPORE
SHSAINT HELENA, ASCENSION AND TRISTAN DA CUNHA
SISLOVENIA
SJSVALBARD AND JAN MAYEN
SKSLOVAKIA
SLSIERRA LEONE
SMSAN MARINO
SNSENEGAL
SOSOMALIA
SRSURINAME
SSSOUTH SUDAN
STSAO TOME AND PRINCIPE
SVEL SALVADOR
SXSINT MAARTEN (DUTCH PART)
SYSYRIAN ARAB REPUBLIC
SZSWAZILAND
TCTURKS AND CAICOS ISLANDS
TDCHAD
TFFRENCH SOUTHERN TERRITORIES
TGTOGO
THTHAILAND
TJTAJIKISTAN
TKTOKELAU
TLTIMOR-LESTE
TMTURKMENISTAN
TNTUNISIA
TOTONGA
TRTURKEY
TTTRINIDAD AND TOBAGO
TVTUVALU
TWTAIWAN, PROVINCE OF CHINA
TZTANZANIA, UNITED REPUBLIC OF
UAUKRAINE
UGUGANDA
UMUNITED STATES MINOR OUTLYING ISLANDS
USUNITED STATES
UYURUGUAY
UZUZBEKISTAN
VAHOLY SEE (VATICAN CITY STATE)
VCSAINT VINCENT AND THE GRENADINES
VEVENEZUELA, BOLIVARIAN REPUBLIC OF
VGVIRGIN ISLANDS, BRITISH
VIVIRGIN ISLANDS, U.S.
VNVIET NAM
VUVANUATU
WFWALLIS AND FUTUNA
WSSAMOA
YEYEMEN
YTMAYOTTE
ZASOUTH AFRICA
ZMZAMBIA
ZWZIMBABWE
+
+ + + diff --git a/install.php b/install.php new file mode 100644 index 0000000..78dc74b --- /dev/null +++ b/install.php @@ -0,0 +1,89 @@ +
+

Installation

+ + + + + + +
+
    +
  • Create table df_distances
  • +
  • Create table df_locations
  • +
  • Create table df_geocities
  • +
  • Insert data into df_geocities (might take a while...)
  • +
+
+
+ + + + $line){ + if(!trim($line))continue; + $insert = array_combine($columns, explode(',', $line)); + dbInsert('df_geocities', $insert); + echo 'row '.$i.' inserted
'; + } +} + +?> + +

Install complete.

+Go to panel +
+ + + + + + + + + + + + diff --git a/javascript.js b/javascript.js new file mode 100644 index 0000000..04d0565 --- /dev/null +++ b/javascript.js @@ -0,0 +1,237 @@ +var map = null; +var geocoder = null; +var nbAddressesProcessed = 0; +var requestDelay = 500; +var maxSliceSize = 20; +var slice = []; +var distanceNA = 'N/A'; +var isStopped = false; +var statusDiv = null; +var markers = []; +var polylines = []; + +var LOCATIONS = { + + index: -1, + elements: [], + + processNext : function(noIncrement){ + if(typeof noIncrement=='undefined'){ + this.index++; + } + if(this.elements.length && this.index < this.elements.length){ + this.processCallback(this); + }else{ + this.endCallback(this); + } + }, + + set: function(property,value){ + this.elements[this.index][property] = value; + }, + + get : function(){ + return this.elements[this.index]; + } + +}; + +function initGoogle(){ + var elem = document.getElementById('map'); + var options = { + zoom: 2, + center: new google.maps.LatLng(51.500152,-0.126236), + mapTypeId: google.maps.MapTypeId.ROADMAP + }; + map = new google.maps.Map(elem, options); + geocoder = new google.maps.Geocoder(); + statusDiv = document.getElementById('search-status').getElementsByTagName('div')[0]; +} + +function geolocateLocation1(callback){ + + if(LOCATION1.id){ + LOCATION1.position = new google.maps.LatLng(LOCATION1.lat, LOCATION1.lng); + callback(); + return; + } + + geocoder.geocode({'address': LOCATION1.adr}, function(results, status){ + + if(status != google.maps.GeocoderStatus.OK){ + alert('The address ['+LOCATION1.adr+'] has caused an error.\nGoogle Geocoder Status: '+status); + return; + } + + var position = results[0].geometry.location; + LOCATION1.lat = position.lat(); + LOCATION1.lng = position.lng(); + + jQuery.post('save-location1.php', {location: LOCATION1}, function(locationId){ + + if(locationId){ + LOCATION1.id = locationId; + LOCATION1.position = position; + callback(); + }else{ + alert('The address ['+LOCATION1.adr+'] has caused an error.\nThe application could not save the location. '+locationId); + } + + }); + + }); + +} + +function geolocateLocationsAll(){ + jQuery.get('get-locations.php?geosrc='+geosrc+'&locationId='+LOCATION1.id, function(json){ + jQuery('#btnStop').show(); + LOCATIONS.processCallback = geolocateLocationN; + LOCATIONS.endCallback = geolocateLocationsEnd; + LOCATIONS.elements = eval(json); + LOCATIONS.processNext(); + }); +} + +function saveLocationOnServer(location, delay) { + nbAddressesProcessed++; + showDistance(location); + slice.push(location); + if(slice.length>=maxSliceSize){ + saveSlice(); + setTimeout(clearMarkers, 500); + setTimeout(function(){ LOCATIONS.processNext(); }, 1000); + }else{ + setTimeout(function(){ LOCATIONS.processNext(); }, delay); + } +} + +function geolocateLocationN(){ + + if(isStopped){ + doAbort(); + return; + } + + var location = LOCATIONS.get(); + + if(location.dst){ + saveLocationOnServer(location, 0); + return; + } + + if(location.id){ + var position = new google.maps.LatLng(location.lat, location.lng); + location.dst = google.maps.geometry.spherical.computeDistanceBetween(LOCATION1.position, position); + saveLocationOnServer(location, 0); + return; + } + + geocoder.geocode({'address': location.adr}, function(results, status){ + + if(status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT){ + setTimeout(function(){ + LOCATIONS.processNext(false); + }, 5000); + return; + } + + if(status != google.maps.GeocoderStatus.OK){ + $('#map').css('opacity','0.3'); + $('#options').show(666); + $('#options h3 span').html(location.adr); + $('#options input').val(location.adr); + jQuery('#btnStop').hide(); + return; + } + + var position = results[0].geometry.location; + location.lat = position.lat(); + location.lng = position.lng(); + location.dst = google.maps.geometry.spherical.computeDistanceBetween(LOCATION1.position, position); + + saveLocationOnServer(location, requestDelay); + + }); + +} + +function geolocateLocationsEnd(){ + setTimeout(saveSlice, 1000); + jQuery('#search-complete').show(); + jQuery('#btnStop').hide(); +} + +function showDistance(location){ + var pos1 = LOCATION1.position; + var pos2 = new google.maps.LatLng(location.lat, location.lng); + var marker2 = new google.maps.Marker({position:pos2}); + var polyline = new google.maps.Polyline({path: [pos1,pos2], strokeColor: "#FF0000", strokeOpacity: 1.0,strokeWeight: 1}); + marker2.setMap(map); + polyline.setMap(map); + showStatus(location.adr, location.dst); + if(!markers.length){ + var marker1 = new google.maps.Marker({position:pos1}); + marker1.setMap(map); + markers.push(marker1); + } + markers.push(marker2); + polylines.push(polyline); +} + +function saveSlice(){ + if(slice.length){ + jQuery.post('save-locations.php?locationId='+LOCATION1.id, {locations:slice}); + slice = []; + } +} + +function doResume() { + unhideMap(); + setTimeout(function(){ + LOCATIONS.set('adr', $('#options input').val()); + LOCATIONS.processNext(false); + },1000); +} + +function doSkip() { + nbAddressesProcessed++; + unhideMap(); + showStatus($('#options input').val(), distanceNA); + LOCATIONS.set('dst', distanceNA); + slice.push(LOCATIONS.get()); + LOCATIONS.processNext(); +} + +function doAbort() { + unhideMap(); + showStatus($('#options input').val(), distanceNA); + geolocateLocationsEnd(); +} + +function showStatus(address, distance) { + if(distance!=distanceNA){ + distance = Math.ceil(distance/1000); + } + var str = 'Addresses processed: '+nbAddressesProcessed+' / '+LOCATIONS.elements.length; + str += '
Last: '+distance+' km to '+address; + statusDiv.innerHTML = str; +} + +function unhideMap() { + $('#map').css('opacity','1'); + $('#options').hide(500); + jQuery('#btnStop').show(); +} + +function clearMarkers() { + for (var i = 0; i < markers.length; i++) { + markers[i].setMap(null); + } + for (var i = 0; i < polylines.length; i++) { + polylines[i].setMap(null); + } + polylines = []; + markers = []; +} + diff --git a/map.php b/map.php new file mode 100644 index 0000000..00e359b --- /dev/null +++ b/map.php @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + +
+
+

Search complete

+ Download . + Start a new search. +
+
+ +
+
+

Unable to geolocate . Your options are:

+ + + + +
1) Stop the search while saving all results found so far
2) Skip this address and save the distance as N/A
3) Correct the address manually and resume the search
+
+
+ +

+
+ +

+ +
+ + + diff --git a/save-location1.php b/save-location1.php new file mode 100644 index 0000000..ab691c7 --- /dev/null +++ b/save-location1.php @@ -0,0 +1,20 @@ + formatAddress($_POST['location']['adr']), + 'latitude' => $_POST['location']['lat'], + 'longitude' => $_POST['location']['lng'], +)); + +echo dbGetInsertId(); + + + diff --git a/save-locations.php b/save-locations.php new file mode 100644 index 0000000..f5bb695 --- /dev/null +++ b/save-locations.php @@ -0,0 +1,36 @@ + formatAddress($location['adr']), + 'latitude' => $location['lat'], + 'longitude' => $location['lng'], + )); + $location['id'] = dbGetInsertId(); + } + + $dst = (string) getDbDistance($locationId, $location['id']); + if ($location['id'] and !$dst){ + dbInsert('df_distances', array( + 'id1' => $locationId, + 'id2' => $location['id'], + 'distance' => $location['dst'], + )); + } + +} + +if(sizeof($distances)){ + $text = implode($distances, NEWLINE) . NEWLINE; + file_put_contents(DISTANCES_FILE, $text, FILE_APPEND); +} + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..f9affbb --- /dev/null +++ b/styles.css @@ -0,0 +1,15 @@ +a { color:blue; } +#map { width:1000px; height:680px; float:left; } +#options { display:none; width:1000px; font-family:sans-serif; } +#options h3 { color:orange; } +#options div { padding:15px; border:double 5px #bbb; } +#options span { font-style:italic; color:#a5bfdd; } +#options button { width:80px; margin-left:10px; } +#options input { width:220px; margin-left:5px; padding-left:2px; } +#country-codes { width:300px; height:300px; overflow:auto; float:right; } +#search-complete { display:none; width:1000px; font-family:sans-serif; } +#search-complete h3 { color:green; } +#search-complete div { padding:15px; border:double 5px #bbb; } +#search-complete span { margin-right:10px; } +#btnStop { display:none; } + diff --git a/towns.txt b/towns.txt new file mode 100644 index 0000000..275ab88 --- /dev/null +++ b/towns.txt @@ -0,0 +1,3 @@ +Thörl, AT +Rovinj, HR +Melbourne, AU