Thanks Mike, but this is not easy to program. How can I know the
current map type and the other two.
I modified the example you told me but I think it is difficult to me
to make the listener work fine. My modified code is below if you can
help me in adding the listener
Thanks for your time and consideration.

/
****************************************************************************************************************/
// Satellite Map Type
    // A SatelliteTypeCtr is a GControl that displays Satellite Map
type
    // button, so we can control its style.
    // Google Maps).
    function SatelliteTypeCtr() {
    }
    SatelliteTypeCtr.prototype = new GControl();
    SatelliteTypeCtr.prototype.initialize = function(map) {
      var container = document.createElement("div");

      var SatelliteTypeDiv = document.createElement("div");
      this.setButtonStyle_(SatelliteTypeDiv);
      container.appendChild(SatelliteTypeDiv);
      GEvent.addDomListener(SatelliteTypeDiv, "click", function() {
                map.setMapType(G_SATELLITE_MAP);
                SatelliteTypeDiv.button.style.border = "2px solid black";
      });

      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of
the
    // map with 75 pixels of padding.
    SatelliteTypeCtr.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(75,
7));
    }

    // Sets the proper CSS for the given button element.
    SatelliteTypeCtr.prototype.setButtonStyle_ = function(button) {
          button.style.border = "1px solid black";
          button.style.fontSize = "12px";
          button.style.fontFamily = "Arial, sans-serif";
          button.style.width="60px";
          button.style.backgroundColor = "#ffffff";
          button.style.textAlign = "center";
          button.innerHTML = "قمر صناعي";
          button.style.cursor = "pointer";
    }

On May 16, 3:48 pm, Mike Williams <[email protected]> wrote:
> Listen for maptypechanged events and set the appropriate button to have
> .style.border="2px solid black" and the other buttons to "1px solid
> black".
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to