Skip to content

Commit

Permalink
* Better handle zooming way out. This is useful for overview, not spe…
Browse files Browse the repository at this point in the history
…cific type maps.
  • Loading branch information
treveradams committed Mar 10, 2014
1 parent 157b1f2 commit 1b52aa7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Binary file added Ol_icon_red_micro_poi.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Ol_icon_red_small_poi.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion get_local_ap.php
Expand Up @@ -82,6 +82,7 @@ function add_blocks($top, $left, $bottom, $right)
$left = doubleval($_GET["l"]);
$top = doubleval($_GET["t"]);
$bottom = doubleval($_GET["b"]);
$zoom = intval($_GET["z"]);
$members = array();
$name="";
$lat="";
Expand Down Expand Up @@ -119,7 +120,9 @@ function add_blocks($top, $left, $bottom, $right)
$long = doubleval($long);
if($lat >= $bottom && $lat <= $top && $long >= $left && $long <= $right)
{
print "$lat\t$long\tOl_icon_red_example.png\t16,16\t8,8\t$name\t$name\t200,80\n";
if($zoom<=11) print "$lat\t$long\tOl_icon_red_micro_poi.png\t1,1\t0,0\t\t\t200,80\n";
else if($zoom<=14) print "$lat\t$long\tOl_icon_red_small_poi.png\t2,2\t1,1\t\t\t200,80\n";
else print "$lat\t$long\tOl_icon_red_example.png\t16,16\t8,8\t$name\t$name\t200,80\n";
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions index.html
Expand Up @@ -112,10 +112,12 @@
function get_poi_url (bounds) {
//bounds = this.adjustBounds(bounds);
var res = this.map.getResolution();
var z = this.map.getZoom();
var path = "l=" + getLeft(bounds)
+ "&t=" + getTop(bounds)
+ "&r=" + getRight(bounds)
+ "&b=" + getBottom(bounds)
+ "&z=" + z
var url = "http://your_domain_here/path_to_owmpdv/get_local_ap.php?";
return url + path;
}
Expand Down

0 comments on commit 1b52aa7

Please sign in to comment.