Dear friend,Thank u so much for ur gr8 support...I need your help for information window in another way.4.How can i set a maptip on eachpicture marker in buttonclick event? Like infowindow showing in featureservice popup sample.All sample mapti...
1.I need to add maptip only on the graphics i adding.For eg:I added 2 graphics on my map. I need to popup inforamtion window when i click only on this two picture graphics.2.I need to popup Status = e.Result(recordcount).EEventName
as informationbelow is the function i am using to add graphics.Please help me..:) Private Sub LastPositionFinalRunning(ByVal sender As Object, ByVal e As SelectLastPositionCompletedEventArgs)
For recordcount = 0 To e.Result.Count - 1
'Dim geometry1 As New Point(csys, rsOman("lon"), rsOman("lat"))
Dim Status As String = ""
Dim EventId As Integer
Dim colourstyle As String
EventId = e.Result(recordcount).EEventID
If EventId = 253 Then
colourstyle = "GlobePictureSymbol_Blue"
ElseIf EventId = 110 Then
colourstyle = "GlobePictureSymbol_Green"
ElseIf EventId = 108 Then
colourstyle = "GlobePictureSymbol_Green"
ElseIf EventId = 101 Then
colourstyle = "GlobePictureSymbol_Red"
ElseIf EventId = 142 Then
colourstyle = "GlobePictureSymbol_Black"
ElseIf EventId = 254 Then
colourstyle = "GlobePictureSymbol_Gray"
Else
colourstyle = "GlobePictureSymbol_Black"
End If
Status = e.Result(recordcount).EEventName
'*************************
''''''''''LOCATION FROM POI and Roaddata same connection not possible bfre close
Dim procname As String = ""
Dim location As String
location = ""
If e.Result(recordcount).EStreetAddress <> "NULL" And e.Result(recordcount).EStreetAddress <> "" Then
location = e.Result(recordcount).ELocationName & ", STREET: " & e.Result(recordcount).EStreetAddress
Else
location = e.Result(recordcount).ELocationName & ""
End If
''''''''''''''''''''''''''
TxtLastUpd.Text = e.Result(recordcount).Edatedisplay
Dim gpsNMEASentences As String = "$GPGGA, 92204.9, " & e.Result(recordcount).ELat & ", N," & e.Result(recordcount).ELon & ", W, 1, 04, 2.4, 25.7, M,,,,*75"
Dim gpsNMEASentenceArray() As String = gpsNMEASentences.Split(ControlChars.Lf)
Dim gpsNMEASentence() As String = gpsNMEASentenceArray(0).Split(","c)
Dim graphic As New Graphic() With
{
.Geometry = mercator.FromGeographic(New MapPoint(Convert.ToDouble(gpsNMEASentence(4)), Convert.ToDouble(gpsNMEASentence(2)))),
.Symbol = TryCast(LayoutRoot.Resources(colourstyle), Symbol)
}
Dim graphicsLayer As GraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayer"), GraphicsLayer)
graphicsLayer.ClearGraphics()
graphicsLayer.Graphics.Add(graphic)
esriLogoImage.Visibility = Windows.Visibility.Collapsed
MyMap.Visibility = Windows.Visibility.Visible
MyMap.ZoomTo(graphicsLayer.FullExtent)
'map1.Center = New DPoint(rsOman("lon"), rsOman("lat"))
'Dim distance2 As MapInfo.Geometry.Distance = New MapInfo.Geometry.Distance(3, map1.Zoom.Unit)
'map1.Zoom = distance2
Next
End Sub