Vote count:
0
I have download the code from the following link
But Zoom Changed event not firing. Here the snippet
Code file
public partial class MapWithZoomLevels : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
GoogleMapForASPNet1.ZoomChanged += new GoogleMapForASPNet.ZoomChangedHandler(OnZoomChanged);
if (!IsPostBack)
{
//You must specify Google Map API Key for this component. You can obtain this key from http://ift.tt/yy8hn2
//For samples to run properly, set GoogleAPIKey in Web.Config file.
GoogleMapForASPNet1.GoogleMapObject.APIKey = ConfigurationManager.AppSettings["GoogleAPIKey"];
//Specify width and height for map. You can specify either in pixels or in percentage relative to it's container.
GoogleMapForASPNet1.GoogleMapObject.Width = "700px"; // You can also specify percentage(e.g. 80%) here
GoogleMapForASPNet1.GoogleMapObject.Height = "400px";
}
}
//Add event handler for PushpinDrag event
void OnZoomChanged(int pZoomLevel)
{
//pID is ID of pushpin which was moved.
lblZoomLevel.Text = pZoomLevel.ToString();
}
}
Design
<div>
<uc1:GoogleMapForASPNet ID="GoogleMapForASPNet1" runat="server" />
<div/>
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire