I have created custom shape files that work and load successfully. I now want to link additional business data from a sql source. Are there any examples or advice on how to accomplish this?
Basic idea: hover over or click a shape and see additional information about what that shape represents, but is not included in the shape file. I assume I can find out that is shape 1, can I? then can I look at my sql data set and grab additional information I asociate with shape 1?
Thank you for the reply. Do you have an example in the 10.3 tools?
Hello conrad1209,
If you still need any assistance on the matter, please do not hesitate to ask.
Below is the codebehind that I am using to change the caption to something else based on the element ID. It does appear to work, however, the captions overlap, some are faded slightly and some are more bold. How can I control that formating so they look better? Or does that have to be done when I am creating the custom shapefile?
private void mymap_Loaded(object sender, RoutedEventArgs e){SampleServiceClient client2 = new SampleServiceClient();
client2.VendersListCompleted +=
new EventHandler<VendersListCompletedEventArgs>(client_VendorListCompleted);client2.VendersListAsync(); }
void client_VendorListCompleted(object sender, VendersListCompletedEventArgs e){foreach (MapElement mapE in this.mymap.Layers[0].Elements){ foreach (Vendors c in e.Result) {if (mapE.Value == c.ID) {mapE.Caption = c.Vendor;} }}
}
I attached a screen shot for reference.
After I load the xammap I am calling the "loaded" event. In that event I am looping through the map elements to get the map value. (The map value is set to the ID number in the shapefile) as I loop through the elements I compare the element.value == a wcf result to match that number to a vendor. when element.value == wcf value I assign the caption. However, when I look at the result, it seems to be assigning captions to a lot of things, reguardless it looks a mess. What am I missing?
This get's me close. I have the hoverover working, but I think I really wanted a popup as the user can not interact with the hover over tooltip. Is there any examples of creating that popup from either hover over or click the shape objects?
I have looked at this but it does not work with what I have so far.https://ko.infragistics.com/community/forums/f/retired-products-and-controls/42136/hover-unhover-issue/233910#233910