Google Maps API Key von externer XML laden

  • Hallo Leute,

    ich würde gern den API Key aus einer externen XML holen.
    Leider funktioniert bisher nichts was ich probiert habe. Meine XML mit dem Key (googlemap.xml) sieht so aus:

    Code
    <krpano version="1.0.8" onstart="set(googlemapkey, 'ABQIAAAA1o88B1eWZuzj36uL6bIt5hSg0ETjWqQPBxN4pY6jj_I_KHaW6BRwMWiK0eGdQQKpceYxx6Mjbl49aw');">
    </krpano>


    Und in der XML wo das Plugin ist versuche ich den Key auszulesen, aber das Plugin scheint sich schon zu initialisieren bevor ich es mit dem Key bestücken kann.


    Hat jemand eine Idee wie ich den Key von der externen XML in das Plugin bekomme?

    Viele Grüße
    Kai

  • googlemaps_iphone.xmlHallo Coyote,

    ich habe irgendwie dasselbe Problem.

    Für eine Tour möchte ich auch gerne den Google Maps Key auslagern, damit ich etwas flexibler bin und mit KrProtect ein SWF-File machen kann.

    Kannst du mir weitere Tipps dafür geben?

    Meine Start - XML (Ist eine erweiterte Form des GoogleMaps Beispiels):


    <krpano version="1.0.8">
    <include url="extra/global.xml" />
    <include url="combobox.xml" />
    <textstyle name="DEFAULT" font="Arial" fontsize="14" bold="true"
    textcolor="0"
    background="false" backgroundcolor="16777215" border="false" bordercolor="0"
    alpha="1" blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
    origin="cursor" edge="bottom" textalign="center" xoffset="0" yoffset="-3" showtime="0.1"
    />
    <!-- googlemaps key -->
    <events onxmlcomplete="set(plugin[google_maps].key, get(googlemapkey));"/>

    <!-- pano area -->
    <area x="0%" width="100%" y="0" height="100%" />

    <!-- hide map button -->
    <plugin name="showmap"
    keep="true"
    url="bilder/googlemaps-logo.png"
    align="leftbottom"
    onclickA="set(state,'A'); tween(plugin[map].x,0%); tween(area.x,35%); tween(area.width,75%);"
    onclickB="set(state,'B'); tween(plugin[map].x,-35%); tween(area.x,0%); tween(area.width,100%);"
    onclick="if(state == 'A', onclickB(), onclickA() );"
    />

    <!-- google map -->
    <plugin name="map"
    parent="STAGE"
    url="plugins/googlemaps.swf"
    keep="true"
    blendmode="layer"
    align="leftbottom"
    x="-35%"
    y="0"
    width="35%"
    height="100%"
    visible="true"
    key="ABQIAAAA8lf5Q_YWlBgNW42302IqaRR4EGXHqsmQktYSoLDqEtJRMZ9KmhSzXHEcs2_IB-4Xw8wZs2VuiEXneg"


    lat="47.42195516256942"
    lng="11.871006488800049"
    zoom="11"

    maptype="physical"
    maptypes="satellite|physical"

    ...

    Und so weiter.

    Wenn ich das Panorama starten will, bekomme ich einen Fehler, dass der Key nicht gefunden wird.
    Bitte um Hilfe.

    Danke

    Hannes

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!