i need to display my sql server table coordinates in thinkgeo map my table structure is
id,coordinates
and data is like
1,32.715,117.163
is there is any server side code sample available to just display coordinates as marker point in thinkgeo map suite i am kind of new in thingeo but i dont see any server side code example in your code sample and tutoral please show me some sample data to only display coordinates from my sql table into thinkgeo map.
Display marker of my sql server table coordinates
Hi Raja,
Our MsSql2008FeatureLayer is work for the scenario when you save your shapes in sql server.
For your scenario, I think you can write your custom class for read table from sql server, then loop the data and add them to map as marker.
You can use SqlConnection and SqlCommand to read data.
For how to add marker, you can visit our sample AddAMarker in our HowDoISamples.
Wish that’s helpful.
Regards,
Don
InMemoryFeatureLayer myData = new InMemoryFeatureLayer();
myData.ZoomLevelSet.ZoomLevel01.DefaultPointStyle =
PointStyles.CreateSimpleCircleStyle(GeoColor.StandardColors.Blue, 10);
myData.ZoomLevelSet.ZoomLevel01.DefaultLineStyle =
LineStyles.CreateSimpleLineStyle(GeoColor.SimpleColors.Green, 6, false);
//Make All Polygons Red with a black outline.
myData.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle =
AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.Red, GeoColor.StandardColors.Black);
//Add a Text Style to Label the shapes on the map.
myData.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("Name", "Arial", 10,
DrawingFontStyles.Bold, GeoColor.StandardColors.Black);
myData.ZoomLevelSet.ZoomLevel01.DefaultTextStyle.HaloPen = new GeoPen(GeoColor.StandardColors.White);
//Apply these styles to all zoom levels
myData.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
return myData;
circle is display in thinkgeo map but now
i wants to create a clickable marker on mydata i try like this
MarkerOverlay markerOverlay = new FeatureSourceMarkerOverlay(myData.ToString());
markerOverlay.Click += btnsave_OnClick;
but it does not working please provide me information about this. thanks in advance
Hi Raja,
It looks you post this question in another topic, I will reply you there.
Regards,
Don