Пример #1
0
    protected void Map1_ChangeView(object sender, AsyncMapEventArgs e)
    {
        Literal litMapZoom      = UpdatePanel_MapViewDisplay.ContentTemplateContainer.FindControl("litMapZoom") as Literal;
        Literal litMapLatitude  = UpdatePanel_MapViewDisplay.ContentTemplateContainer.FindControl("litMapLatitude") as Literal;
        Literal litMapLongitude = UpdatePanel_MapViewDisplay.ContentTemplateContainer.FindControl("litMapLongitude") as Literal;

        if (litMapZoom != null)
        {
            litMapZoom.Text = e.zoomLevel.ToString();
        }

        if (litMapLatitude != null)
        {
            if (e.latlong == null)
            {
                litMapLatitude.Text = "?";
            }
            else
            {
                litMapLatitude.Text = e.latlong.Latitude.ToString();
            }
        }

        if (litMapLongitude != null)
        {
            if (e.latlong == null)
            {
                litMapLongitude.Text = "?";
            }
            else
            {
                litMapLongitude.Text = e.latlong.Longitude.ToString();
            }
        }
    }
Пример #2
0
    protected void Map1_OnClick(object sender, AsyncMapEventArgs e)
    {
        if (e.leftMouseButton)
        {
            if (e.Shape == null)
            {
                //Add pushpin where the user clicked.
                Simplovation.Web.Maps.VE.Shape shape = new Simplovation.Web.Maps.VE.Shape(e.latlong);
                shape.Title       = "OnClick Shape";
                shape.Description = "Lat: " + e.latlong.Latitude.ToString() + "<br/>Lng: " + e.latlong.Longitude.ToString();

                Map1.AddShape(shape);
            }
            else
            {
                //Center on the pushpin the user clicked
                Map1.LatLong = e.Shape.Points[0];
            }
        }
        else if (e.rightMouseButton)
        {
            if (e.Shape != null)
            {
                //If the user right-clicked on a pushpin, remove it from the map
                Map1.DeleteShape(e.Shape);
            }
        }
    }
Пример #3
0
    protected void Map1_EndZoom(object sender, AsyncMapEventArgs e)
    {
        Literal litMapZoom = UpdatePanel_MapZoomDisplay.ContentTemplateContainer.FindControl("litMapZoom") as Literal;

        if (litMapZoom != null)
        {
            litMapZoom.Text = e.zoomLevel.ToString();
        }
    }
Пример #4
0
    protected void Map1_EndPan(object sender, AsyncMapEventArgs e)
    {
        Literal litMapLatitude  = UpdatePanel_MapViewDisplay.ContentTemplateContainer.FindControl("litMapLatitude") as Literal;
        Literal litMapLongitude = UpdatePanel_MapViewDisplay.ContentTemplateContainer.FindControl("litMapLongitude") as Literal;

        if (litMapLatitude != null)
        {
            litMapLatitude.Text = e.latlong.Latitude.ToString();
        }

        if (litMapLongitude != null)
        {
            litMapLongitude.Text = e.latlong.Longitude.ToString();
        }
    }
Пример #5
0
 protected void Map1_Click(object sender, AsyncMapEventArgs e)
 {
     Map1.FindLocations(e.latlong);
 }
Пример #6
0
 protected void Map1_ChangeView(object sender, AsyncMapEventArgs e)
 {
     //Show the School Districts in the viewable area
     LoadSchoolDistrictsForView(e.MapView);
 }
Пример #7
0
 protected void Map1_ChangeMapType(object sender, AsyncMapEventArgs e)
 {
     DisplayMapType();
 }