• Hello,

    Well, my license is not quite one day old, so time to start with a couple newbie questions....

    It seems that the only way to choose the different Google map types is with a separate button for each type. I would like to make the most of the limited space available in my Google map and use a drop-down menu to select the map type as you can in the Google Maps API with GMenuMapTypeControl. Is this possible?

    One map type that I would find really useful is from MyTopo, which is a seamless topographic map coverage for the US and Canada. The last post in this thread has some technical details. I suspect that I would need the plugin source code to implement this extra map type?

    Cheers,

    Joe

  • Hi,

    It seems that the only way to choose the different Google map types is with a separate button for each type. I would like to make the most of the limited space available in my Google map and use a drop-down menu to select the map type as you can in the Google Maps API with GMenuMapTypeControl. Is this possible?

    it is possible to change the map type interactively via the setmaptype() action of the plugin,
    see here:
    https://krpano.com/plugins/googlemaps/#setmaptype

    so it would be also possible to use the combobox plugin and call there this action,
    e.g. call:

    Code
    plugin[maps].setmaptype(SATELLITE);

    One map type that I would find really useful is from MyTopo, which is a seamless topographic map coverage for the US and Canada. The last post in this thread has some technical details. I suspect that I would need the plugin source code to implement this extra map type?

    yes, for adding a custom map you would need the plugin source code at the moment, but you would also need AS3 coding knowledge,
    and one important note - don't mix-up the Javascript and the Flash Google Map API (they are different)

    best regards,
    Klaus

  • Hello Klaus,

    Thanks for the info

    it is possible to change the map type interactively via the setmaptype() action of the plugin,
    see here:
    https://krpano.com/plugins/googlemaps/#setmaptype
    so it would be also possible to use the combobox plugin and call there this action,

    OK, I see. The imagerain example looks like a good starting point.

    I was hoping it might be possible to avoid this extra complexity and directly use the drop-down control from the Maps API. Perhaps doing something as simple as this for example:

    Code
    <maptypecontrol  visible="true" anchor="topright" x="15" y="5" buttonalign="m" />

    where you could use something like buttonalign="m" to get Google's drop-down menu.

    Wishfully,
    Joe

  • Hello,

    For the general benefit, here's a combobox-based solution to my question:


    Note that the combobox is located offscreen (along with my Google Map). I use an action to bring everything into view when needed.

    My biggest problem was figuring out where to put selectitem(Satellite); in my xml. I first tried to use

    onloaded="plugin[combobox].selectitem(Satellite);"

    in the map plugin, which didn't work. It took me a while to realize the obvious solution.

    Cheers,
    Joe

Jetzt mitmachen!

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