Archived community.zenoss.org | full text search
Skip navigation
19711 Views 2 Replies Latest reply: Dec 6, 2007 11:26 AM by crash_override RSS
crash_override Newbie 2 posts since
Dec 6, 2007
Currently Being Moderated

Dec 6, 2007 9:51 AM

Changing Google map view

Hi all!
About you there's a way to change the Google map portlet style?
I've read the google map API documentation and seems to be a simple operation.

This is from google documentation:

  
Map Attributes

By default, maps show up within the Google Maps API using standard "painted" tiles. However, the Google Maps API also supports other maps types. The following map types are standard:

    * G_NORMAL_MAP- the default view
    * G_SATELLITE_MAP - showing Google Earth satellite images
    * G_HYBRID_MAP - showing a mixture of normal and satellite views
    * G_DEFAULT_MAP_TYPES - an array of these three types, useful for iterative processing

You can set the map type using the GMap2 object's setMapType() method. For example, the following code sets the map to use the satellite view from Google Earth:

var map = new GMap2(document.getElementById("map_canvas"));
  map.setMapType(G_SATELLITE_MAP);



I've searched into the zenoss tree but I haven't found anything...

Where should I change this attribute?


Thanks a lot

Umberto "crash_override" Bernardi

Linux Registered User 353811

******************************

Impossibilila nemo tenetur....
  • Ian McCracken ZenossEmployee 257 posts since
    Feb 26, 2007
    Currently Being Moderated
    1. Dec 6, 2007 10:40 AM (in response to crash_override)
    Changing Google map view
    No way is currently exposed to the user. That said, if you're
    comfortable with changing code, edit $ZENHOME/Products/ZenWidgets/
    skins/zenui/javascript/geomap.js, and somewhere after line 24 add your:

    this.map.setMapType(G_SATELLITE_MAP);

    Then do the same thing to geomap-2.1.js, in the same directory.
    Restart Zope with:

    zopectl restart

    And clear your browser cache. If you want to be able to change the map
    type from the UI, you can add the type selection control:

    this.map.addControl(new GMapTypeControl());

    --Ian

    On Dec 6, 2007, at 9:52 AM, crash_override wrote:

     

     

    Hi all!
    About you there's a way to change the Google map portlet style?
    I've read the google map API documentation and seems to be a simple
    operation.

    This is from google documentation:


    Code:

    Map Attributes

    By default, maps show up within the Google Maps API using standard
    "painted" tiles. However, the Google Maps API also supports other
    maps types. The following map types are standard:

    * G_NORMAL_MAP- the default view
    * G_SATELLITE_MAP - showing Google Earth satellite images
    * G_HYBRID_MAP - showing a mixture of normal and satellite views
    * G_DEFAULT_MAP_TYPES - an array of these three types, useful for
    iterative processing

    You can set the map type using the GMap2 object's setMapType()
    method. For example, the following code sets the map to use the
    satellite view from Google Earth:

    var map = new GMap2(document.getElementById("map_canvas"));
    map.setMapType(G_SATELLITE_MAP);





    I've searched into the zenoss tree but I haven't found anything...

    Where should I change this attribute?


    Thanks a lot

    Umberto "crash_override" Bernardi

    Linux Registered User 353811

    ******************************

    Impossibilila nemo tenetur....







    _______________________________________________
    zenoss-dev mailing list
    zenoss-dev@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-dev


    _______________________________________________
    zenoss-dev mailing list
    zenoss-dev@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-dev

More Like This

  • Retrieving data ...