Szukam już dwa dni i nie mogę znaleźć działu gdzie mogę wygenerować ten kod.
Przeniosłem stronę na inny serwer i inną domenę i teraz wyskakuje mi że muszę mieć inny kod ale gdzie go zdobyć!
Kilka miesięcy temu generowałem ten kod i nie miałem problemu teraz to co się tam dzieje to jakiś koszmar nic nie można znaleźć.
Szukałem w google i kieruje mnie to
http://code.google.com/intl/pl/apis/maps/signup.html
i
https://code.google.com/apis/console/#project:122646697603
tu sprawdzałem i wygenerowałem coś takiego
Client ID: 122646697603.apps.googleusercontent.com Client secret: Yo0hXitUoloQ1_nrQzyz2lro Redirect URIs: <a href="http://www.------site" target="_blank">http://www.------site</a> -----.co.uk/oauth2callback JavaScript origins: <a href="http://www.---------site----------.co.uk" target="_blank">http://www.---------site----------.co.uk</a>
ale to też nie działa
i pojawia się taki komunikat
Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v2 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: <a href="http://code.google.com/apis/maps/documentation/javascript/v2/introduction.html#Obtaining_Key" target="_blank">http://code.google.com/apis/maps/documenta...l#Obtaining_Key</a>
tak wygląda kod odpowiadający za wyświetlanie mapy
require "mapy/nxgooglemapsapi.php"; $api = new NXGoogleMapsAPI(); // setup the visual design of the control $api->setWidth(675); $api->setHeight(450); $api->setZoomFactor(14); $api->addControl(GLargeMapControl); $api->addControl(GMapTypeControl); $api->addControl(GOverviewMapControl); $lokalizacja = $a['lokalizacja']; $ulica = $a['ulica']; $post_code = $a['post_code']; // add an address. the address is geocoded in the webbrowser, not by the server! $api->addAddress("$ulica, $lokalizacja $post_code", "<br>Tu mieszkam!!! <br>Ulica $ulica w $lokalizacja", true); ?>
Klasa
<?php define(GoogleMapsKey, 'ABQIAAAAxB8iPCTfcjaENcRS1Jt9sRQ7HPCK_Yo0hXitUoloQ1_nrQzyz2lro'); // to jest kod starej domeny ...reszta kody wykasowana z uwagi na ograniczenia długości posta ?>