Want Gmaps Map or Bing Map to diseappear with i click on a spot

  • Hello,

    I've put some spots on the Google map and i'm blocked : when i click on a spot which is on the Google map, the chosen scene appears in the background but the map is still here.

    I don't want to have the Google map still in the first level and i prefer to have it hidden after cliking on the spot.

    It is possible ? i haven't found something on this ......

    Thanks a lot for your help and have a nice day.

    Regards
    Manu *rolleyes*

  • Hi Umalo.

    Maybe i've done something wrong, i've just tested :

    <spot name="Chateau_Montjoux_122013" lat="46.3712657405864" lng="6.46697759628296" heading="200" active="true" onclick="hide_map();loadscene(Chateau_Montjoux_122013,null,BLEND(1))" />

    <action name="hide_map">
    set(layer[google_map].visible,false);
    </action>


    and it does not work : i still have the google map on the first level after clicking on the spot.

    I 've tested with "bing_map", "google_map" .... it tells me at the web page load : "/plugins/maps.js" does not exists ...

    Ok: i copied the file googlemaps.jp to maps.js but it still does not work.

    I missed something ?

    tks a lot a happy new year :)

    Manu

  • Do you have spot element inside map layer like this?

    <plugin name="map"
    url="googlemaps.swf"
    ...
    >
    <spot name="Chateau_Montjoux_122013" lat="46.3712657405864"
    lng="6.46697759628296" heading="200" active="true"
    onclick="hide_map();loadscene(Chateau_Montjoux_122013,null,BLEND(1))"

    />

    <radar visible="true" ... />
    <positioncontrol visible="false" ... />
    <zoomcontrol visible="false" ... />
    <maptypecontrol visible="false" ... />
    </plugin>

  • Hard to say when I don't see complete code (send me xml on mail or pm).
    I see you are trying to call scene that is named same as spot name. This I think is also not correct but shouldn't be the reason why you map is not hidden.
    Is map plugin name google_map?

  • Here are the files used ....

    i have some spot references in both files ... but links are on the vtour skin.

    here is the result : http://www.lookit.org/vueduciel/vtour/

    You can see that when you click on a spot on the google map, the panorama changes in background but the map is still here ....

    it's my "from sky" panoramas web site ... just starting.

    I really appreciate your help ... tks a lot guys.

    Happy new year :)

    Regards
    Manu

  • There are two maps. Which one we are talking about?
    Not sure that actions should be nested in layer definitions.
    Try moving hide_map action below last /layer row. Add some traces to see if it is executed:

    Code
    <action name="hide_map">
    showlog(); trace(HIDDING the map);
    set(layer[skin_map].visible,false);
    </action>


    Remove second action with same name.
    Also take care that your plugin is not called google_map but skin_map where

  • yup, thanks a lot ...

    it's better now as this :

    <spot name="Chateau_de_Thenieres_112013" lat="46.303468" lng="6.325942" heading="200" active="true" onclick="hide_map();loadscene(Chateau_de_Thenieres_112013,null,BLEND(1))" />
    <spot name="Saint_Jean_Daulps_122013" lat="46.234585" lng="6.655675" heading="200" active="true" onclick="hide_map();loadscene(Saint_Jean_Daulps_122013,null,BLEND(1))" />
    <spot name="Port_Thonon_122013" lat="46.375440" lng="6.477814" heading="200" active="true" onclick="hide_map();loadscene(Port_Thonon_122013,null,BLEND(1))" />
    <spot name="Chateau_Montjoux_122013" lat="46.3712657405864" lng="6.46697759628296" heading="200" active="true" onclick="hide_map();loadscene(Chateau_Montjoux_122013,null,BLEND(1))" />

    </layer>
    </layer>
    </layer>
    </layer>
    <action name="hide_map">
    set(layer[skin_map].visible,false);
    </action>


    But i have a strange thing now : I have like a veil on the view when the map disappears.

    In fact i have to click a second time on the "earth" to have this veil disappeared.

    you see it ? http://www.lookit.org/vueduciel/vtour/

  • Umalo,

    as you can see now on my website : it works as expected.

    I've added the thumbs in the bottom.

    Wish you lot of good things :) for this new year.

    You can see the Geneva Jet now from sky for this first day !

    :)
    Manu

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!