Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            GMap1.setCenter(new GLatLng(41, 2), 6);

            GMap2.Height = 456;
            GMap2.Width  = 300;
            GMap2.setCenter(new GLatLng(20, 15), 2);
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            GMap1.Add(new GMapUI());
            GMap1.GZoom = 2;

            GMap2.Add(new GMapUI());
            GMap2.GZoom = 2;

            List <GMarker> markers = new List <GMarker>();

            Random r = new Random();

            for (int i = 0; i < 200; i++)
            {
                GMarker gMarker = new GMarker(new GLatLng(r.Next(0, 60), r.Next(-30, 30)));
                markers.Add(gMarker);
                GListener listener = new GListener(gMarker.ID, GListener.Event.click, string.Format(@"function () {{ var w = new google.maps.InfoWindow(); w.setContent('<center>{0}</center>'); w.open({1}, {2});}}", i, GMap1.GMap_Id, gMarker.ID));
                GMap1.Add(listener);
            }

            GMap2.markerClusterer = new MarkerClusterer(markers);


            MarkerClustererStyleOptions markerClustererStyleOptions = new MarkerClustererStyleOptions();

            markerClustererStyleOptions.textColor = Color.Yellow;

            MarkerClustererOptions markerClustererOptions = new MarkerClustererOptions(60, 10);


            MarkerClustererStyleOptions styleOptionsA = new MarkerClustererStyleOptions();

            styleOptionsA.height    = 36;
            styleOptionsA.width     = 40;
            styleOptionsA.anchor_x  = 6;
            styleOptionsA.anchor_y  = 0;
            styleOptionsA.textColor = Color.Blue;
            styleOptionsA.url       = "http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/1.0/images/conv40.png";

            MarkerClustererStyleOptions styleOptionsB = new MarkerClustererStyleOptions();

            styleOptionsB.height    = 35;
            styleOptionsB.width     = 35;
            styleOptionsB.anchor_x  = 16;
            styleOptionsB.anchor_y  = 0;
            styleOptionsB.textColor = Color.WhiteSmoke;
            styleOptionsB.url       = "http://gmaps-utility-library.googlecode.com/svn/trunk/markerclusterer/1.0/images/people35.png";



            markerClustererOptions.markerClustererStylesOptions.Add(styleOptionsA);
            markerClustererOptions.markerClustererStylesOptions.Add(styleOptionsB);


            MarkerClusterer markerClusterer = new MarkerClusterer(markers, markerClustererOptions);

            GMap1.markerClusterer = markerClusterer;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            GMap1.Add(new GMapUI());

            GMapUIOptions options = new GMapUIOptions();

            options.maptypes_hybrid   = false;
            options.keyboard          = false;
            options.maptypes_physical = false;
            options.zoom_scrollwheel  = false;

            GMap2.Add(new GMapUI(options));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            GMap1.setCenter(new GLatLng(40, 1));
            GMap2.setCenter(new GLatLng(39, 2));

            GMap1.Add(new GControl(GControl.extraBuilt.TextualCoordinatesControl));
            GMap1.Add(new GControl(GControl.extraBuilt.MarkCenter));
            GMap2.Add(new GControl(GControl.extraBuilt.TextualCoordinatesControl));
            GMap2.Add(new GControl(GControl.extraBuilt.MarkCenter));

            TabPanel1.OnClientClick = GMap1.getChangeHiddenStateFunction();
            TabPanel3.OnClientClick = GMap2.getChangeHiddenStateFunction();

            TabContainer1.ActiveTabIndex = 0;
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                GMap2.Add(new GListener(GMap2.GMap_Id, GListener.Event.zoomend,
                                        string.Format(@"   
                    function(oldZoom, newZoom) 
                    {{ 
                        var store = new Store('{0}_Store'); 
                        store.Set(Math.random(), oldZoom + '-' + newZoom);   
                    }}             
                    ", GMap2.GMap_Id)));

                GMap2.Add(new GControl(GControl.preBuilt.SmallZoomControl));
            }

            GMap1.Store.Add(i.ToString(), DateTime.Now.ToString());
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            GWeatherLayerOptions options = new GWeatherLayerOptions()
            {
                TemperatureUnits = GWeatherLayerOptions.TemperatureUnit.Celsius,
                WindSpeedUnits   = GWeatherLayerOptions.WindSpeedUnit.MetersPerSecond
            };

            GLayer layerWeather = new GLayer(GLayerType.Weather, options);

            GMap1.Add(layerWeather);

            GLayer layerPanoramio = new GLayer(GLayerType.Panoramio);

            GMap2.Add(layerPanoramio);

            //GLayer layerClouds = new GLayer(GLayerType.Clouds);
            //GMap2.Add(layerClouds);
        }