protected string GMap1_Click(object s, Subgurim.Controles.GAjaxServerEventArgs e)
        {
            GMap gmap = new GMap(e.map);

            // GMarker and GInfoWindow
            GMarker     marker = new GMarker(e.point);
            GInfoWindow window = new GInfoWindow(marker, "Cool!!", true);

            gmap.Add(window);

            // Movement
            //gmap.addMovement(1000, e.point + new GLatLng(25, 38));
            //gmap.addMovement(1000, e.point);

            // Polylines
            if (e.point != e.center)
            {
                List <GLatLng> points = new List <GLatLng>();
                points.Add(e.center);
                points.Add(e.point);

                gmap.Add(new GPolyline(points, Color.Yellow));
            }

            // Controls
            gmap.Add(new GControl(GControl.extraBuilt.MarkCenter));
            gmap.Add(new GControl(GControl.preBuilt.LargeMapControl));
            gmap.Add(new GControl(GControl.preBuilt.MapTypeControl));

            // Maybe... anything? ;)
            gmap.enableHookMouseWheelToZoom = false;
            gmap.mapType = GMapType.GTypes.Satellite;

            return(gmap.ToString());
        }
        protected string GMap1_Click(object s, Subgurim.Controles.GAjaxServerEventArgs e)
        {
            GMap gmap = new GMap(e.map);

            // GMarker and GInfoWindow
            GMarker marker = new GMarker(e.point);
            GInfoWindow window = new GInfoWindow(marker, "Cool!!", true);
            gmap.Add(window);

            // Movement
            //gmap.addMovement(1000, e.point + new GLatLng(25, 38));
            //gmap.addMovement(1000, e.point);

            // Polylines
            if (e.point != e.center)
            {
                List<GLatLng> points = new List<GLatLng>();
                points.Add(e.center);
                points.Add(e.point);

                gmap.Add(new GPolyline(points, Color.Yellow));
            }

            // Controls
            gmap.Add(new GControl(GControl.extraBuilt.MarkCenter));
            gmap.Add(new GControl(GControl.preBuilt.LargeMapControl));
            gmap.Add(new GControl(GControl.preBuilt.MapTypeControl));

            // Maybe... anything? ;)
            gmap.enableHookMouseWheelToZoom = false;
            gmap.mapType = GMapType.GTypes.Satellite;

            return gmap.ToString();
        }
Beispiel #3
0
 // empty tile displayed
 void MainMap_OnEmptyTileError(int zoom, GMap.NET.Point pos)
 {
     MessageBox.Show("OnEmptyTileError, Zoom: " + zoom + ", " + pos.ToString(), "GMap.NET", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 }