Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di agenti
    Registrato dal
    Feb 2002
    Messaggi
    2,427

    caricare google maps su pagina protetta SSL

    <?

    ho trovato un post che in teoria spiega come evitare la fastidiosa apertura dell'alert "oggetto non protetto" su IE nel caso di utilizzo con SSL e google maps.
    qui è il post..
    http://groups.google.com/group/Googl...e81cbe4086938c


    l'ho testato ma in realtà riesco solo a inizializzare la mappa, visualizzando i controlli. La mappa è grigia con la dicitura " we are sorry but dont have maps at this zoom ".
    Ma non è in realtà un problema di zoom.

    Il codice lato server è :


    $loadUrl = $_SERVER [ "argv" ] [ 0 ];
    /** Loading the content of the thing we got */
    $content = join ( '', file ( $loadUrl ) );
    /** Using it under test conditions on both http and https
    connections, so we have to select here */
    $scheme = ($_SERVER [ "SERVER_PORT" ] == 80 ? "http" : "https");
    /** Building redirect path */
    $wwwpath = $scheme."://".$_SERVER [ "HTTP_HOST" ].$_SERVER [
    "SCRIPT_NAME" ]."?";
    /** Replacing the content */
    $content = str_replace ( "http://", $wwwpath."http://", $content );
    /** Output */
    echo $content ;


    lato client:


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example: Simple Map</title>
    <script src="inc/sslproxy.php?http://maps.google.com/maps?file=api...p;key=mia_keys"
    type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
    if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 2);
    map.setUIToDefault();
    }
    }

    </script>
    </head>

    <body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
    </body>
    </html>
    2000 post e sono più vecchio di 4 anni...
    grazie a tutti....

  2. #2
    Utente di HTML.it L'avatar di agenti
    Registrato dal
    Feb 2002
    Messaggi
    2,427
    mi sono accorto che ho questo errore javascript:

    Errore: unterminated parenthetical
    File sorgente: https://www.miosito.it/sadm/inc/sslp...4419,-122.1419
    Riga: 2, Colonna: 11
    Codice sorgente:
    Warning: file(http://maps.google.com/maps/vp&amp;spn=7...4419,-122.1419) [<a href
    2000 post e sono più vecchio di 4 anni...
    grazie a tutti....

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.