Example #1
0
                            $lat[] = $dat[7];
                            $lon[] = $dat[8];
                            $tip[] = 2;
                            $dir = array();
                            $dir[] = $dat[3];
                            $dir[] = $dat[2];
                            $dir[] = $dat[4];
                            $dir[] = $dat[6];
                            //region
                            $dir[] = $dat[7];
                            //lat
                            $dir[] = $dat[8];
                            //lon
                            $dir[] = ucwords("" . $dat[3] . " " . $dat[2] . " " . $dat[4] . " " . $dat[6] . " ");
                            //completa
                            addDireccion($dir, 3);
                            $id_pto = getIdDireccionXLatLon($dat[7], $dat[8]);
                            $direc[] = $id_pto;
                        }
                    } else {
                        ?>
						<script>
							mensaje("No hay resultados para la busqueda","myPopup");
							</script>
						<?php 
                    }
                }
            }
            if (count($calle) > 0) {
                foreach ($calle as $i => $cal) {
                    $dir = ucwords($cal) . " #" . $num[$i] . ", " . ucwords($com[$i]);
Example #2
0
                foreach ($direccion_query as $i => $direc) {
                    if (trim($direc[2]) == "") {
                        $direc[2] = 0;
                    }
                    $dir[] = $direc[3];
                    $dir[] = $direc[2];
                    $dir[] = $direc[4];
                    $dir[] = $direc[6];
                    //region
                    $dir[] = $direc[7];
                    //lat
                    $dir[] = $direc[8];
                    //lon
                    $dir[] = ucwords("" . $direc[3] . " " . $direc[2] . " " . $direc[4] . " " . $direc[6] . " ");
                    //completa
                    addDireccion($dir, $busqueda);
                    $id_pto = getIdDireccionXLatLon($direc[7], $direc[8]);
                    $distancia = distancia($_REQUEST['lon'], $_REQUEST['lat'], $direc[8], $direc[7]);
                    $texto = "<div id=titulo1>Direccion</div>";
                    $texto .= "<div id=titulo2>" . ucwords(utf8_encode(toponimos(strtolower($direc[3])))) . " #" . $direc[2] . "</div>";
                    $texto .= "<div id=titulo3>" . ucwords(utf8_encode(toponimos(strtolower($direc[4])))) . "</div>";
                    //$texto=ucwords(utf8_encode($texto));
                    $texto .= "<div id=botonera><img class=img_boton src=images/favorito.png title=Agregar a favoritos onclick=javascript:addFavorito(" . $estado_ses . "," . $id_pto . ",1);><img class=img_boton src=images/mail.png title=Enviar por correo onclick=compartirPto(" . $id_pto . ",1);><img class=img_boton src=images/facebook.png title=Compartir en Facebook onclick=javascript:compartirFace(**" . $CM_path_base2 . "?ptot=1&pto=" . $id_pto . "**);> <a href=**https://twitter.com/share?url=" . $CM_path_base2 . "?ptot=1&pto=" . $id_pto . "&via=chilemap&text=Revisa este link** target=_BLANK><img  class=img_boton src=images/twitter.png title=Compartir en Twitter></a></div>";
                    $texto = str_replace("'", "", $texto);
                    ?>
				<script>
					CM_busqueda[CM_busqueda.length]="<?php 
                    echo $direc[7];
                    ?>
,<?php 
                    echo $direc[8];