Vous êtes ici : Accueil Wireless Wireless news Toonux Fon Spot
Actions sur le document

Toonux Fon Spot

Par bluetouff - Dernière modification 04/06/2007 04:11

Toonux et ses amis

      <script type="text/javascript">
//<![CDATA[
window.onload = function create_gmap() {
  if (GBrowserIsCompatible()) {
    // Create map
    var map = new GMap2(document.getElementById("map"));

    map.addControl(new GLargeMapControl());


    map.addControl(new GMapTypeControl());


    map.addControl(new GOverviewMapControl())


    map.setCenter(new GLatLng(48.846624, 2.299664), 13, G_SATELLITE_MAP);


    // Create marker icon
    var icon = new GIcon();
    icon.image = "http://www.toonux.org/gmap_marker.png";
    icon.shadow = "http://www.toonux.org/gmap_shadow.png";
    icon.iconSize = new GSize(20, 34);
    icon.shadowSize = new GSize(37, 34);
    icon.iconAnchor = new GPoint(9, 34);
    icon.infoWindowAnchor = new GPoint(9, 2);

    // Create markers and events
    function createMarker(point, html) {
      var marker = new GMarker(point, icon);
      GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml(html);
      });
      return marker;
    }

    function addMarker(markerNo, lat, lng){
      var point = new GLatLng(lat, lng)
      var marker = new GMarker(point, icon)
      map.addOverlay(marker);
      var f = function(){
        //map.centerAtLatLng(point);
        marker.openInfoWindowHtml(document.getElementById('marker_html_' + markerNo).innerHTML);
      };
      GEvent.addListener(marker, 'click', f);
      var marker_field = document.getElementById('marker_link_'+ markerNo);
      if(marker_field){
        marker_field.onmousedown = f;
      }
    } 


    addMarker(1, 48.876796, 2.377682)

    addMarker(2, 48.88563, 2.386651)

    addMarker(3, 48.892929, 2.344487)

    addMarker(4, 48.88473, 2.336223)

    addMarker(5, 48.951479, 1.918831)

    addMarker(6, 48.846624, 2.299664)

    addMarker(7, None, None)

  }
}
//]]>
</script>


    



Tag Cloud Navigator
Blogroll & friends
  • My Linuxfr
  • Bluetouff@owni
  • Social Network

    Digg!

     


    Toonux is powered By FreeBSD, Zope & Plone and owned by Bluetouff ]-- Pilot Systems ring website

    Toonux contents are copyleft under the WTFPL licence