Ignore:
Timestamp:
Dec 11, 2011, 8:55:04 PM (12 years ago)
Author:
rvelices
Message:

rv_gmaps can show now different markers based on number of photos at the location

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/map_data.php

    r12706 r12719  
    122122  if ($i) rvo( ",\n\n" );
    123123  rvo( "{" );
    124   rvo( 'position: '. jsgm_position( bounds_center($c['bounds']) ) );
     124  rvo( 'position: '. jsgm_position( bounds_center($c->bounds) ) );
    125125  rvo( ",\n" );
    126   rvo( 'bounds: '. jsgm_bounds( $c['bounds'] ) );
     126  rvo( 'bounds: '. jsgm_bounds( $c->bounds ) );
    127127  rvo( ",\n" );
    128   rvo( 'nb_items: '.count($c['items']) );
     128  rvo( 'nb_items: '.count($c->items) );
    129129  rvo( ",\n" );
    130130
    131   rvo( 'blowup_url: "'.rvm_duplicate_blowup_url(array('box'=>$c['bounds']), array('start') ). '"' );
     131  rvo( 'blowup_url: "'.rvm_duplicate_blowup_url(array('box'=>$c->bounds), array('start') ). '"' );
    132132  rvo( ",\n" );
    133133
    134134  $max_per_cluster = rvm_get_config_var('nb_images_per_marker',20);
    135   if ( count($c['items']) >  $max_per_cluster )
     135  if ( count($c->items) >  $max_per_cluster )
    136136  {
    137     $c['items'] = array_slice($c['items'], 0, $max_per_cluster);
     137    $c->items = array_slice($c->items, 0, $max_per_cluster);
    138138  }
    139139  rvo( 'items: [' );
    140   for ($j=0; $j<count($c['items']); $j++)
     140  for ($j=0; $j<count($c->items); $j++)
    141141  {
    142     $img = $page['items'] [ $c['items'][$j] ];
     142    $img = $page['items'] [ $c->items[$j] ];
    143143    $img['file'] = basename( $img['path'] );
    144144    if (!empty( $img['name'] ) )
Note: See TracChangeset for help on using the changeset viewer.