Skip to content

Commit

Permalink
reorganize files
Browse files Browse the repository at this point in the history
--HG--
rename : demos/cities15000.txt => demos/tools/cities15000.raw.txt
rename : demos/csv2json.php => demos/tools/csv2json.php
rename : demos/back.png => images/back.png
rename : loader.gif => images/loader.gif
rename : search-icon.png => images/search-icon.png
rename : demos/style.css => style.css
  • Loading branch information
stefanocudini committed Feb 17, 2013
1 parent d08313f commit 7e7033b
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion demos/ajax-bulk.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet-search.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../style.css" />
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion demos/ajax.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet-search.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../style.css" />
</head>

<body>
Expand Down
5 changes: 0 additions & 5 deletions demos/index.php

This file was deleted.

4 changes: 2 additions & 2 deletions demos/jsonp-filtered.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet-search.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../style.css" />
</head>

<body>
Expand All @@ -27,7 +27,7 @@ <h4>JSONP Example: <em>search locations by third party jsonp service, with filte
var map = new L.Map('map', {zoom: 9, center: new L.latLng([41.575730,13.002411]) });
map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer

var jsonpurl = 'http://open.mapquestapi.com/nominatim/v1/search.php?format=json&json_callback={c}&q={s}&osm_type=N&limit=100';
var jsonpurl = 'http://open.mapquestapi.com/nominatim/v1/search.php?json_callback={c}&q={s}&format=json&osm_type=N&limit=100';
//third party jsonp service

function filter(rawjson) { //callback that remap fields name
Expand Down
2 changes: 1 addition & 1 deletion demos/jsonp.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet-search.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../style.css" />
</head>

<body>
Expand Down
8 changes: 4 additions & 4 deletions demos/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
{"loc":[41.794008,12.583884], "title":"green"},
{"loc":[41.575730,13.002411], "title":"red"},
{"loc":[41.546175,13.673590], "title":"yellow"}
]',true); //simulate database data
]',true); //SIMULATE A DATABASE data
//the searched field is: title

if(isset($_GET['cities'])) //for ajax-bulk.html example
if(isset($_GET['cities'])) //SIMULATE A BIG DATABASE, for ajax-bulk.html example
$data = json_decode( file_get_contents('cities15000.json'), true);
//load big data store, cities15000.json (about 14000 records)

Expand All @@ -82,9 +82,9 @@ function searchInit($text) //search initial text in titles

$json = json_encode($fdata,true);

#usleep(200000); //simulate connection latency for localhost test
#usleep(200000); //simulate connection latency for localhost tests

echo isset($_GET['callback']) ? $_GET['callback']."($json)" : $json; //support for jsonp request
echo isset($_GET['callback']) ? $_GET['callback']."($json)" : $json; //support for JSONP request



Expand Down
2 changes: 1 addition & 1 deletion demos/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/leaflet/leaflet.css" />
<link rel="stylesheet" href="../leaflet-search.css" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../style.css" />
</head>

<body>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions demos/csv2json.php → demos/tools/csv2json.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Leaflet Search Plugin 1.1.0
* Leaflet Search Plugin 1.2.0
* https://github.com/stefanocudini/leaflet-search
* https://bitbucket.org/zakis_/leaflet-search
* http://labs.easyblog.it/maps/leaflet-search
Expand All @@ -19,7 +19,7 @@
$data = array();
$m = 30000; //max imports
$n = 0; //counter
if ($csvFile = fopen('cities15000.txt', 'r'))
if ($csvFile = fopen('cities15000.raw.txt', 'r'))
{
while ($row = fgetcsv($csvFile, 5000, "\t") and --$m)
{
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
20 changes: 15 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Leaflet.Control.Search</title> <meta http-equiv="Content-Type"
content="text/html; charset=utf-8" /> <link rel="stylesheet" href="demos/style.css" /> </head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Leaflet.Control.Search</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" />
</head>

<body id="home"> <h2>Leaflet.Control.Search</h2> <div id="desc"> A Leaflet Control for search markers location by
attribute<br /> and much more... </div>
<body id="home">

<h2>Leaflet.Control.Search</h2>

<div id="desc">
A Leaflet Control for search markers location by attribute<br />
and much more...
</div>

<div id="content">
<h4>Features</h4>
Expand Down
16 changes: 7 additions & 9 deletions leaflet-search.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
* Leaflet Search Control 1.2.0
* http://labs.easyblog.it/maps/leaflet-search
*
* https://github.com/stefanocudini/leaflet-search
* https://bitbucket.org/zakis_/leaflet-search
* http://labs.easyblog.it/maps/leaflet-search
*
* Copyright 2012, Stefano Cudini - stefano.cudini@gmail.com
* Copyright 2013, Stefano Cudini - stefano.cudini@gmail.com
* Licensed under the MIT license.
*/

Expand All @@ -16,13 +17,10 @@
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
/* padding:5px;*/
border: 1px solid #888;
/*background-color: rgba(0, 0, 0, 0.25);*/
background-color: rgba(255, 255, 255, 0.8);
z-index:1000;
box-shadow: 0 0 8px rgba(0,0,0,0.4);

margin-left: 13px;
margin-top: 12px;
}
Expand All @@ -40,27 +38,27 @@
margin:2px;
}
.leaflet-control-search .search-input.load {
background: url('loader.gif') no-repeat center right #fff;
background: url('images/loader.gif') no-repeat center right #fff;
}
.leaflet-control-search .search-button {
display:block;
float:left;
width:22px;
height:22px;
background: url('search-icon.png') no-repeat 0 0;
background: url('images/search-icon.png') no-repeat 0 0;
background-color: rgba(255, 255, 255, 0.3);
border-radius:4px;
}
.leaflet-control-search .search-button:hover {
background: url('search-icon.png') no-repeat 0 -21px;
background: url('images/search-icon.png') no-repeat 0 -21px;
}
.leaflet-control-search .search-tooltip {
position:absolute;
top:100%;
left:0;
float:left;
min-width:80px;
max-height:106px;/* .search-tip height * 5 */
max-height:106px;/*(.search-tip height * 5)*/
box-shadow: 0 0 8px rgba(0,0,0,0.4);
-webkit-border-radius: 5px;
-webkit-border-top-left-radius: 0;
Expand Down
5 changes: 3 additions & 2 deletions leaflet-search.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
* Leaflet Search Control 1.2.0
* http://labs.easyblog.it/maps/leaflet-search
*
* https://github.com/stefanocudini/leaflet-search
* https://bitbucket.org/zakis_/leaflet-search
* http://labs.easyblog.it/maps/leaflet-search
*
* Copyright 2012, Stefano Cudini - stefano.cudini@gmail.com
* Copyright 2013, Stefano Cudini - stefano.cudini@gmail.com
* Licensed under the MIT license.
*/

Expand Down
2 changes: 1 addition & 1 deletion demos/style.css → style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ body {
font-family:Arial;
}
body#home {
background:url('back.png') no-repeat top left #b5d0d0;
background:url('images/back.png') no-repeat top left #b5d0d0;
margin-left:150px;
}

Expand Down

0 comments on commit 7e7033b

Please sign in to comment.