こんにちは。 サンプルページを公開すると、レスポンスがよくなります。 API キーは、取得時に指定したサイト固有のものになります。iframe のページを提供しているサイト名が、API キーを取得したサイト名と一 致していますか?
例えば、API キーを、yoursite1.yourdomain.co.jp で取っていて、iframe のページが http://yoursite.yourdomain.co.jp/iframe.html だと、API キーは無効です。 yoursite1.yourdomain.co.jp と yoursite.yourdomain.co.jp が同じマシンであってもです。 Hello, You may better provide the URL to your sample page to get better responses. An API key is site-specific. If the iframe page is served from a different site than the one your API key is issued for, you will get the error. For example, if you got your API key for yoursite1.yourdomain.co.jp and your iframe page is served at http://yoursite.yourdomain.co.jp/iframe.html, your key is not valid even though yoursite1.yourdomain.co.jp and yoursite.yourdomain.co.jp point to the same machine. Thanks, Ei On Jul 28, 5:08 am, 康子 永松 <[email protected]> wrote: > Gmap.htmlは下記のようにしました。 > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <head> > <meta http-equiv="content-type" content="text/html; charset=utf-8"/ > > <title>Google Maps JavaScript API Example</title> > <script src="http://maps.google.com/maps?file=api&v=2&key=自 > 分のキー" > type="text/javascript"></script> > <script type="text/javascript"> > //<![CDATA[ > function load() { > if (GBrowserIsCompatible()) { > //var map = new GMap2(document.getElementById("map")); //====== > 変更====== > var map = new GMap2(document.getElementById("map")); //====== > 追加====== > map.addControl(new GMapTypeControl()); //====== > 追加====== > map.setCenter(new GLatLng(33.129759, 130.059156), 2); //===数字を > 変更=== > //北緯・東経・ > ズーム(1-15) > } > } > //]]> > </script> > </head> > <body onload="load()" onunload="GUnload()"> > <div id="map" style="width: 500px; height: 300px"></div> > </body> > </html> > > そして載せたい所に下記を貼りつけました。 > <iframe src="gmap.htm" width="500" height="300" frameborder="0" > scrolling="no"></iframe> > > しかし、googlemap APIキーが必要とでます。 > どこが間違っていますか? > よろしくお願いします。 -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
