Hi,
I have a code where i get the location from a server and also some information. I used to use a pointstyle and textstyle to display it. but my requirement is to display a point and when hovered on that point i need the information on the popup. I am new to mvc and mapsuite.
The code i have for placing point is as follows:
[MapActionFilter]publicvoidRefreshMarkerOverlayss(Map map, Collection<object> args){List<incident> positions =newList<incident>();if(map !=null){TextStyle txtStyle =newTextStyle("Name",newGeoFont("Arial", 9),newGeoSolidBrush(newGeoColor(51, 155, 51)));txtStyle.SuppressPartialLabels =false;PointStyle ps =newPointStyle(PointSymbolType.Circle,newGeoSolidBrush(newGeoColor(255, 0, 0)), 10);
//List<double> position = new List<double>();using(WebClient webClient =newWebClient()){stringdwml;dwml = webClient.DownloadString(ServiceUri +"GetAllOpenIncidents/");// position = JsonConvert.DeserializeObjectAsync
<list<double>>(dwml).Result;positions = JsonConvert.DeserializeObjectAsync
<list<incident>>(dwml).Result;
}
intsizes = positions.Count;intj;
var overLay = map.CustomOverlays["TOverLay"]asLayerOverlay;InMemoryFeatureLayer inMemoryLayer2 = overLay.Layers[1]asInMemoryFeatureLayer;
inMemoryLayer2.InternalFeatures.Clear();for(j = 0; j < sizes; j++){
doublex = positions[j].incidentPointLocationX;doubley = positions[j].incidentPointLocationY;//double y = Double.Parse(positions[j + 3].ToString());stringz = positions[j].incidentPointName;//string a = ". " + (string)positions[j+ 1];
PointShape Radarpoints =newPointShape(x, y);Feature f2 =newFeature(newPointShape(x, y));f2.ColumnValues["Name"] = z;inMemoryLayer2.InternalFeatures.Add(f2);
}
I want a similar code for popup.
Thanks