custom icons for each zoom level
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Apr 2011 19:25:16 +0000 (21:25 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Apr 2011 19:25:16 +0000 (21:25 +0200)
koha-import.pl
tiles.pl

index d251ef7..aa7805b 100755 (executable)
@@ -178,7 +178,7 @@ select
 into geo_count
 from geo_biblioitems
 join geo_city on city_koha = geo_biblioitems.city
-where length(geo_city.city) > 1 or length(country) > 1
+where length(geo_city.city) > 1
 group by geo_city.city, country, lat, lng
 order by count(biblionumber) desc
 
index 00f2f4c..31f8fec 100755 (executable)
--- a/tiles.pl
+++ b/tiles.pl
@@ -185,6 +185,9 @@ while ( ($zoom,$tilex,$tiley) = $sth->fetchrow_array )
   $imicon = $imicon1 ;
  }
 
+ my $custom_icon = "$name/icons/$zoom.png";
+ $imicon = GD::Image->newFromPng( $custom_icon ) if -e $custom_icon;
+
  $sti = $dbh->prepare("select latpix,lngpix from gvp_world_tiles where zoom = $zoom and tilex = $tilex and tiley = $tiley") ;
 
  $sti->execute ;