individual ids/classes for geocoder search results
This commit is contained in:
parent
448e6cfdc7
commit
fbe722465d
@ -84,20 +84,20 @@ _showResults: function(response, parameters) {
|
|||||||
|
|
||||||
// show possible results for input
|
// show possible results for input
|
||||||
var html = "";
|
var html = "";
|
||||||
html += '<table class="description medium-font">';
|
html += '<table class="results medium-font">';
|
||||||
for(var i=0; i < response.length; i++){
|
for(var i=0; i < response.length; i++){
|
||||||
var result = response[i];
|
var result = response[i];
|
||||||
|
|
||||||
//odd or even ?
|
//odd or even ?
|
||||||
var rowstyle='description-body-odd';
|
var rowstyle='results-body-odd';
|
||||||
if(i%2==0) { rowstyle='description-body-even'; }
|
if(i%2==0) { rowstyle='results-body-even'; }
|
||||||
|
|
||||||
html += '<tr class="'+rowstyle+'">';
|
html += '<tr class="'+rowstyle+'">';
|
||||||
html += '<td class="description-body-counter"><span">'+(i+1)+'.</span></td>';
|
html += '<td class="results-body-counter"><span">'+(i+1)+'.</span></td>';
|
||||||
html += '<td class="description-body-items">';
|
html += '<td class="results-body-items">';
|
||||||
|
|
||||||
if(result.display_name){
|
if(result.display_name){
|
||||||
html += '<div class="description-body-item" onclick="OSRM.Geocoder._onclickResult(\''+parameters.marker_id+'\', '+result.lat+', '+result.lon+');">'+result.display_name+'</div>';
|
html += '<div class="results-body-item" onclick="OSRM.Geocoder._onclickResult(\''+parameters.marker_id+'\', '+result.lat+', '+result.lon+');">'+result.display_name+'</div>';
|
||||||
}
|
}
|
||||||
html += "</td></tr>";
|
html += "</td></tr>";
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,54 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* style for information-box table (search results, driving directions) */
|
/* style for information-box table (general) */
|
||||||
|
.no-results
|
||||||
|
{
|
||||||
|
text-align:center;
|
||||||
|
margin:28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* style for information-box table (search results) */
|
||||||
|
.results
|
||||||
|
{
|
||||||
|
border-spacing:0px;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
.results-body-odd
|
||||||
|
{
|
||||||
|
background-color: #FFFDE3;
|
||||||
|
}
|
||||||
|
.results-body-even
|
||||||
|
{
|
||||||
|
background-color: #FFF9BB;
|
||||||
|
}
|
||||||
|
.results-body-counter
|
||||||
|
{
|
||||||
|
text-align:right;
|
||||||
|
vertical-align:top;
|
||||||
|
font-weight:bold;
|
||||||
|
padding:1px 5px 1px 5px;
|
||||||
|
}
|
||||||
|
.results-body-items
|
||||||
|
{
|
||||||
|
text-align:left;
|
||||||
|
vertical-align: middle;
|
||||||
|
width:100%;
|
||||||
|
padding:1px;
|
||||||
|
}
|
||||||
|
.results-body-item
|
||||||
|
{
|
||||||
|
cursor:pointer;
|
||||||
|
color:#000000
|
||||||
|
}
|
||||||
|
.results-body-item:hover
|
||||||
|
{
|
||||||
|
color:#ff0000
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* style for information-box table (driving directions) */
|
||||||
.description
|
.description
|
||||||
{
|
{
|
||||||
border-spacing:0px;
|
border-spacing:0px;
|
||||||
@ -283,13 +330,6 @@ html, body {
|
|||||||
{
|
{
|
||||||
background-color: #FFF9BB;
|
background-color: #FFF9BB;
|
||||||
}
|
}
|
||||||
.description-body-counter
|
|
||||||
{
|
|
||||||
text-align:right;
|
|
||||||
vertical-align:top;
|
|
||||||
font-weight:bold;
|
|
||||||
padding:1px 5px 1px 5px;
|
|
||||||
}
|
|
||||||
.description-body-items
|
.description-body-items
|
||||||
{
|
{
|
||||||
text-align:left;
|
text-align:left;
|
||||||
@ -324,11 +364,6 @@ html, body {
|
|||||||
{
|
{
|
||||||
color:#ff0000
|
color:#ff0000
|
||||||
}
|
}
|
||||||
.no-results
|
|
||||||
{
|
|
||||||
text-align:center;
|
|
||||||
margin:28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* buttons */
|
/* buttons */
|
||||||
|
Loading…
Reference in New Issue
Block a user