Подтвердить что ты не робот

Iphone/Ipad Google Maps Iframe Embed

У меня есть карта google, встроенная в iframe. Просто что-то вроде:

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" 
marginwidth="0" src="http://maps.google.de/?ie=UTF8&amp;ll=51.151786,10.415039&
amp;spn=23.5119,51.723633&amp;t=h&amp;z=5&amp;output=embed"></iframe>

В браузерах это нормально, но Iphone/Ipad пытается загрузить приложение. Который, кажется, работает нормально (у меня его нет), но страница загружается, и пользователь получает всплывающее сообщение с вопросом, хочет ли он запустить приложение. Есть ли способ просто отобразить карту в Iframe?

4b9b3361

Ответ 1

Я думаю, что самый простой способ - загрузить Карты Google с помощью API Карт Google напрямую.

Недавно я столкнулся с проблемой, и я нашел код в этот учебник очень полным и полезным.

Ответ 2

Я предполагаю, что это не правильный способ загрузки googleMap в html/iFrame...

Мне также было интересно, как я управлял (и он отлично работает в iFrame): используя "яблочный iWeb" виджет google map... это недорогое программное обеспечение...

это мой html-код в "myGoogleMap.html" (после того, как я удалил все неиспользуемые html):

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <meta name="iWeb-Build" content="local-build-20110308" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta name="viewport" content="width=700" />
    <title>Testo
</title>
    <link rel="stylesheet" type="text/css" media="screen,print" href="Vuoto_files/Vuoto.css" />
    <!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Vuoto_files/VuotoIE.css'/><![endif]-->
    <!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
    <script type="text/javascript" src="Scripts/iWebSite.js"></script>
    <script type="text/javascript" src="Scripts/Widgets/SharedResources/WidgetCommon.js"></script>
    <script type="text/javascript" src="Scripts/Widgets/GoogleMap/GoogleMap.js"></script>
    <script type="text/javascript" src="Vuoto_files/Vuoto.js"></script>
  </head>
<body style="background: rgb(0, 0, 0) margin: 0pt; " onload="onPageLoad();" onunload="onPageUnload();">

    <div class="com-apple-iweb-widget-GoogleMap aboveStrokesAndFrames" id="widget1"
   style="height: 400px; left: 0px; opacity: 1.00; position: absolute; top: 0px; width: 320px; z-index: 1; ">
    </div>

    <script type="text/javascript"><!--//--><![CDATA[//><!--
new GoogleMap('widget1', 'Scripts/Widgets/GoogleMap', 'Scripts/Widgets/SharedResources', '.', {"language": "it", "showInfo": "0", "locatedAddressIsFromGeocoder": "1", "unlocatedAddress": "", "zoomLevel": "6", "center": "51.261915,10.151367", "locatedAddressPoint": "19.56661,-99.134932", "locatedAddress": "my address in Mexico, Pico de Orizaba 3A, Lomas de Cuautepec, Delegazione Gustavo A. Madero, Cittá del Messico, Distrito Federal, Messico", "showGoogleBar": "1", "showMarker": "1", "showZoom": "1"});
//--><!]]>
    </script>
</body>
</html>

и я загружаю его в другой html с помощью этого:

<iframe width="320" height="400" frameborder="0" scrolling="no" marginheight="0" 
marginwidth="0" src="Sito-test/myGoogleMap.html">
</iframe>

конечно, вам нужен javaScript, сделанный iWeb, но я не уверен, что могу законно показать им...

В любом случае, дело в том, что теперь вы знаете, что его можно загрузить в iFrame без "установки вопроса приложения"...