Hi,
I've extended map component with my own class.
Public Class ZTMap
Inherits Map
[....]
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
If Not Me.Page.IsPostBack Then
Me.MapBackground.BackgroundBrush = New GeoSolidBrush(GeoColor.FromArgb(255, 233, 232, 214))
Me.MapTools.ScaleLine.Enabled = False
Me.MapTools.KeyboardMapTool.Enabled = True
Me.MapTools.MiniMap.MaximizeRatio = 32
Me.MapTools.MiniMap.MinimizeRatio = 32
Me.EditOverlay.TrackMode = TrackMode.None
Me.MapTools.MiniMap.Enabled = False
Me.MapUnit = GeographyUnit.Feet
Me.MapBackground.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.DeepOcean)
Me.SetDefaultZoomLevels()
Me.LoadDefaultLayers()
Me.CurrentExtent = Me.StartExtent
Me.RestrictedExtent = Me.StartExtent
End If
[...]
End Sub
On my web page I've handled Click and TrackShapeFinished events.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
AddHandler ZTMap1.Click, AddressOf SelectFeature_Click
AddHandler ZTMap1.TrackShapeFinished, AddressOf ZTMap1_FinishedTrackShape
end Sub
My map is build over shape files.
When my map is loaded the cursor become an hand. The map is clickable and every time the user clicks on map a postback is fired! This is the first strange behavior. I don't want a postback for every user click . I only want to handle the user click over some feature.
The second strange behavior is that when a postback is done the zoom level changes, sometimes the new level is the previous extent, sometimes the new level is the map extent.
help!
thanks
John