Pushpins disappearing when latitude, longitude and zoom set on server side.

Last post 10/15/2008 2:37:22 PM by Chris Pietschmann. 3 replies. << Back to Web.Maps.VE v1.0 General
10/10/2008 2:45:09 PM
kreid

Pushpins disappearing when latitude, longitude and zoom set on server side.

If I click a button on my page, it should zoom into level 12, centering the map on a specific latitude and longitude; however, when I try this, all the pushpins on the map disappear.  This used to work with the PietschSoft.VE3 control.

EnableViewState and AsyncPostbackPassShapesare both true.

Ideas?


10/15/2008 1:47:55 PM
Chris Pietschmann

Re:Pushpins disappearing when latitude, longitude and zoom set on server side.

It should work as expected. Count you post the code that gets runs when you are changing the lat/lng and zoom level?
10/15/2008 2:15:54 PM
kreid

Re:Pushpins disappearing when latitude, longitude and zoom set on server side.

    protected void ProblemListSelectButton_Click(object sender, ImageClickEventArgs e)
    {
        ImageButton senderButton = ((ImageButton)sender);
        GridViewRow gvr = ((GridViewRow)senderButton.Parent.Parent);

        string sitename = ((Label)senderButton.Parent.Parent.FindControl("NameLabel")).Text;

        SiteXmlManipulator sitexml = new SiteXmlManipulator(Application["SiteRoot"].ToString());
        XmlNode siteDetails = sitexml.GetSiteDetails("AllSites.xml", sitename);
        string latitude = siteDetails.Attributes["latitude"].Value;
        string longitude = siteDetails.Attributes["longitude"].Value;

        Map1.Latitude = double.Parse(latitude);
        Map1.Longitude = double.Parse(longitude);
        Map1.Zoom = 12;

    }
10/15/2008 2:37:22 PM
Chris Pietschmann

Re:Pushpins disappearing when latitude, longitude and zoom set on server side.

Are you sure there isn't any code elsewhere that is clearing the pushpins? Also, (I know its a stupid question, but...) are you sure you're not just moving the map away and moving the pushpins out of view?