Google Map API Key + mehrere Domains
Liebe Google-Suchende: Zur Webseite des neuen Ärztehaus in Rheinbach geht es hier lang
Kleines Code-Snippet für die Nutzung mehrerer API-Keys in einer Seite. Unterscheidung der Domain über JavaScript browserseitig. Hinweis: Funktioniert nicht mit Umlautdomains, was aber mehr an Google selber liegt. Habe es noch nicht geschafft, einen API-Key für eine Umlautdomain zu erstellen.
-
<script type="text/javascript">
-
var googleMapsApiKeys = [];
-
googleMapsApiKeys[‘http://cdgdgdg-in-rheinbach.de’] = ‘…..’;
-
googleMapsApiKeys[‘http://www.fddfdf-in-rheinbach.de’] = ‘…..’;
-
googleMapsApiKeys[‘http://xxxxhausinrheinbach.de’] = ‘….’;
-
googleMapsApiKeys[‘http://xxxxxhausinrheinbach.de’] = ”;
-
googleMapsApiKeys[‘http://www.bgdgghausinrheinbach.de’] = ‘…..’;
-
-
document.write(‘<script src="http://maps.google.com/maps?file=api&v=2&key=’+googleMapsApiKeys[location.protocol+"//"+location.host]+‘" type=\”text/javascript\”><\/script>’);
-
</script>
About this entry
You’re currently reading “Google Map API Key + mehrere Domains,” an entry on coffee, the web and me.
- Published:
- 21.04.08 / 10pm
- Category:
- Sinnloses, Spam, everyday life, republica
No comments
Jump to comment form | comments rss [?] | trackback uri [?]