it is same code using mappoint webservice which could run in .net 2003.but
couldn't run in .net 2005.
see the attached code.
*****************
Sub RenderMap(ByVal myPanHorizontalAdjustment As Double, ByVal
myPanVerticalAdjustment As Double, ByVal myZoomValue As Double)
Dim renderService As MSMapService.RenderServiceSoap = New
MSMapService.RenderServiceSoap
Dim ourCredentials As New
NetworkCredential(ConfigurationManager.AppSettings ("MPUser"),
ConfigurationManager.AppSettings("MPPass"))
renderService.Credentials = ourCredentials
renderService.PreAuthenticate = True
'Get the latest map specification object
Dim mapSpec As MapSpecification
mapSpec = CType(Cache("myMapSpec"), MapSpecification)
'Cache("myMapSpec")
'Pan or zoom the map as appropriate
mapSpec.Options.PanHorizontal = mapSpec.Options.PanHorizontal +
myPanHorizontalAdjustment
mapSpec.Options.PanVertical = mapSpec.Options.PanVertical +
myPanVerticalAdjustment
If Not (mapSpec.Options.Zoom + myZoomValue <= 0) Then
mapSpec.Options.Zoom = mapSpec.Options.Zoom + myZoomValue
End If
'Declare the map image array and get the map
Dim myMapImages() As MapImage
Try
myMapImages = renderService.GetMap(mapSpec)
****
here return nothing if u use 2005.but it is ok for 2003
*****
'Assign the map image url
MapImage.ImageUrl = myMapImages(0).Url
'Also restore the changed map specification
Cache("myMapSpec") = mapSpec
Catch myException As SoapException
'Your exception handling goes here
End Try
End Sub
*******************
any suggest appreciated
Thanks
Fred