Estoy rediseñando una pagina, el diseño fue hecho en cakephp y el cliente me pidio casi que obligatorio arreglar esta segmento y ando un poco confuso con ciertas nomenclaturas.
tengo este codigo:
caja de busqueda
Código PHP:
   echo $form->create('Tienda', array('action' => 'buscar'));
      echo $form->input('codigopostal', array('label' => false, 'style' => 'height: 26px', 'style'=>'background-color:#cccccc'));
      echo $form->submit('/img/boton-buscar.png', array('id' => 'boton-buscar', 'style' => 'height: 24px'));
      echo $form->end(); 
    Código PHP:
  
 <script type="text/javascript">
            crearMapa('<?php echo $tienda['Tienda']['id']?>', '<?php echo $tienda['Tienda']['calle'].' '.$tienda['Tienda']['numero'].' '.$tienda['Tienda']['municipio']?>');
          </script>
          <a href="http://maps.google.com/maps?hl=es&q=<?php echo rawurlencode($tienda['Tienda']['calle'].' '.$tienda['Tienda']['numero'].' '.$tienda['Tienda']['municipio'])?>" style="width: 250px;">ver mapa más grande</a>   Si me pueden hechar una mano, se los agradeceria, estoy ya que me jalo los pelos de la nariz


Aca dejo todo el codigo:
Código PHP:
   
<?php 
echo $javascript->link("http://maps.google.com/maps?file=api&v=2&key=ABQIAAAADhb49kvWW_EuX877H-HayhTzYn489b6Sq9Gk7U36xFZFkzybDxSsQXnuqQauSIWQtTB6sz4xHzDeNg", true);
?>
 
<?php echo $javascript->link('tiendas', false); ?>
    
<div id="donde_encontrarlo" style="height:auto;">
    
<div id="tienda-chica" style="<?php if (!empty($tiendas)){ ?>position: absolute;<?php }?>top:-20px;"></div>
 
<?php if(empty($tiendas)){ ?>
 
<div id="tienda-texto1">
  <?php echo $html->image('donde_encontrarlo.png'); ?>
</div>
<div id="tienda-tiendas">
  <div id="tienda-tienda1"></div>
  <table id="tienda-formTienda">
  <tr>
    <td style="width: 20px;"> </td>
    <td style="text-transform: uppercase; color: #FF9F2F; text-align: left;"><?php __('TIENDAS'); ?></td>
  </tr>
  <tr>
    <td> </td>
    <td style="text-align: left; color: white;"><?php __('Introduce tu código postal y descubre lo cerca que estamos de ti.'); ?></td>
  </tr>
  <tr>
    <td> </td>
    <td>
      <?php
      echo $form->create('Tienda', array('action' => 'buscar'));
      echo $form->input('codigopostal', array('label' => false, 'style' => 'height: 26px', 'style'=>'background-color:#cccccc'));
      echo $form->submit('/img/boton-buscar.png', array('id' => 'boton-buscar', 'style' => 'height: 24px'));
      echo $form->end();
      ?>
    </td>
  </tr>
  <tr>
    <td colspan="2" style="height: 100px;"> </td>
  </tr>
  </table>
  <div id="tienda-tienda2"></div>
  <table id="tienda-formCorner">
  <tr>
    <td style="width: 20px;"> </td>
    <td style="text-transform: uppercase; color: #FF9F2F; text-align: left;"><?php __('CORNERS'); ?></td>
  </tr>
  <tr>
    <td> </td>
    <td style="text-align: left; color: white;"><?php __('Consíguenos en nuestros corners de El Corte Inglés. Encuentra aquí el más cercano.'); ?></td>
  </tr>
  <tr>
    <td> </td>
    <td style="text-align: left;">
      <a href="corners/">
      <?php
      echo $html->image('entrar.png');
      ?></a>
    </td>
  </tr>
  <tr>
    <td colspan="2" style="height: 100px;"></td>
  </tr>
</table>
  
<?php }else{ ?>
    
  <div id="contenido-tiendas" style="position: absolute;left: 450px;">
    <table style="width: 450px;">
      <?php foreach ($tiendas as $tienda): ?>    
      <tr>              
        <td style="width: 250px;">      
          <div id="tienda<?php echo $tienda['Tienda']['id']?>" style="width: 30px; height: 300px;">
          <?php echo $html->image('/'.Configure::read('IMAGES.DIR').'/'.$tienda['Tienda']['foto'], array('style' => 'width: 350px; height: 300px;')); ?>
          </div>   
          <script type="text/javascript">
            crearMapa('<?php echo $tienda['Tienda']['id']?>', '<?php echo $tienda['Tienda']['calle'].' '.$tienda['Tienda']['numero'].' '.$tienda['Tienda']['municipio']?>');
          </script>
          <a href="http://maps.google.com/maps?hl=es&q=<?php echo rawurlencode($tienda['Tienda']['calle'].' '.$tienda['Tienda']['numero'].' '.$tienda['Tienda']['municipio'])?>" style="width: 250px;">ver mapa más grande</a>
        </td>
        <td class="direccion" style="background-color:#4D4D4D; bottom:1.5em;">
          <div  style="line-height: 12pt; font-weight:bold;">
            <?php echo $tienda['Tienda']['callevia'], ' ', $tienda['Tienda']['calle'], ', ', $tienda['Tienda']['numero']; ?>,<br/>
            <?php echo $tienda['Tienda']['municipio'], ', ', $tienda['Tienda']['provincia']; ?>
          </div>        
        </td>
      </tr>    
      <?php endforeach; ?> 
    </table>
    <?php if (isset($tiendas) && empty($tiendas)) { ?>
    <p>
      <?php __('No se han encontrado tiendas')?>
    </p>
    <?php } else {   } ?>
        
  </div>
<?php } ?>
</div>
</div>    
  
 

 Google Maps y php
 Google Maps y php 
