Hi Prasanna,
These are the suggestions to your doubts:
1. Sorry, we didn’t understand the question. Please express it more precisely.
2. Sure we can place markers on map using bitmaps. The cause of your problem is similar to the last one. We have to specify a location for the marker, elsewise the map wouldn’t know where to place the marker.
Please try the code below:
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay();
Marker marker = new Marker(-74.002533, 40.734771);
marker.ImageSource = new BitmapImage(new Uri(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Water lilies.jpg", UriKind.RelativeOrAbsolute));
marker.Width = 20;
marker.Height = 34;
markerOverlay.Markers.Add(marker);
map.Overlays.Add(new WorldMapKitWmsWpfOverlay());
map.Overlays.Add(markerOverlay);
map.Refresh();
It’s very similar to the code you posted, we just specified a location for the marker and added world map kit as a base map so that we can see the marker is shown somewhere near New York City (which has a position of [-74.002533, 40.734771]).
3. The world file should by shipped with the image file by your data vendor.
And if you are intended to use regular image files which have no world files associated with, of course you can also make world files of your own. Here is some links about the world file format:
kralidis.ca/gis/worldfile.htm
en.wikipedia.org/wiki/World_file
And you can use the WorldFile class we provided in the name space: ThinkGeo.MapSuite.Core to do the work for you, here is some sample code:
WorldFile worldFile = new WorldFile(new RectangleShape(-74, 45, -70, 40), 800, 600);
StringBuilder sb = new StringBuilder();
sb.AppendLine(worldFile.HorizontalResolution.ToString());
sb.AppendLine(worldFile.RotationRow.ToString());
sb.AppendLine(worldFile.RotationColumn.ToString());
sb.AppendLine(worldFile.VerticalResolution.ToString());
sb.AppendLine(worldFile.UpperLeftX.ToString());
sb.AppendLine(worldFile.UpperLeftY.ToString());
sb.ToString();
You can save the result of sb.ToString() to a file and associate it with an image file(sized 800x600) will make it show up near <st1:state w:st="on"><st1:place w:st="on">New York</st1:place></st1:state>.
Please let us know if you have any other questions.
Thanks,
Tsui