Permalink
Browse files

better icons.html example, with advance query, and also added bulk of…

… icon checking functionality to server within json.php
  • Loading branch information...
1 parent 2b720e5 commit 8c78a345333cdad03e492b4d8d54da8b61482633 @msmalley committed Nov 6, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 json.php
View
@@ -44,7 +44,11 @@
$marker_info['content'] = '<pre>'.print_r($result,true).'</pre>';
$marker_info['this_id'] = $db->_id($result['_id']);
$marker_info['slug'] = '?id='.$db->_id($result['_id']);
- $marker_info['icon'] = $result['feature_code'].'.png';
+ if(file_exists(__DIR__.'/img/'.$result['feature_code'].'.png')){
+ $marker_info['icon'] = $result['feature_code'].'.png';
+ }else{
+ $marker_info['icon'] = false;
+ }
if(count($markers)<1) $marker_info['open'] = true;
else $marker_info['open'] = false;
$markers[] = $marker_info;

0 comments on commit 8c78a34

Please sign in to comment.