ThinkGeo.com    |     Documentation    |     Premium Support

Silverlight Edition Sample

Just started using the Silverlight edition. I have a copy of the WorldMapKit (Beta - current full version on the way).


Is there a short example on how to use the World Map kit with the Silverlight edition? I can't seem to get a layer (\USA\HighwayNetwork1_10m in my test case) to display on my map. I've added the shape files as a resource and set the Build Action to "Content".


I've reviewed all of the "How Do I samples", but haven't had any success getting this to work. If anyone can point me in the right direction, I'd appreciate it!


Bob


 


 


 



Bob,



WorldMapKit contains almost 20G data on the server; it’s not the right way to send these data to the client side. On the other hand, we don’t support real-time getting data and rendering. So by now I just recommend you to use server rendering and Silverlight Edition is a views instead. Please see the screenshot below.



Here is what I did:



1, replace the same files with the attached files.

2, copy the world map kit class in the web project.

3, change the data folder to the right directory.



Please let me if you have any questions.



Thanks,

Howard



849-Post5941.zip (1.05 KB)

Thanks Howard - I was able to get a test page working with the world map kit with your example and a minor few tweaks. While zooming in & out I was getting a few errors - I’ll capture the screens and upload them tomorrow. I’m not sure if this is related to the Deep Zoom issue that is being reported with the Silverlight control. How do you handle street labels that don’t appear on the map (highest zoom level)?

In experimenting with the World Map kit and Silverlight control, I came across the following scenario. I was viewing the map where I live and came up with two different results. With the Silverlight Control & the World Map kit I get:



When I view the same location from the World Map Kit On Line Demo, I get:



Why don't I get the same results?



Bob,



Yes, the label in maps.thinkgeo.com is a little different from our Silverlight Eidtion. I tested it in our current WorldMapKit and Silverlight, they are exactly the same. You can tell from the following screenshot.



[Figure 1 : Silverlight]


[Figure 2 : Web]





The problem is that WorldMapKit doesn’t reference the latest web edition dll. Sorry for the inconvenient.



If you have any questions please let me know.



Thanks,

Howard



I thought the labels were derived from the shape files and not any DLL’s. 
  
 So which files do I need to have to get the complete street labels? In my Silverlight/World Map kit screen shot - the northern streets are labeled (Cattail & Creekwood) and the southern streets are not. In my web/WorldMap kit screen shot, the northern streets are not labeled, but the southern ones are (Singingwood & Waterwheel). What do I need so that both the northern & southern street labels are visible?

Bob,



I mean if the label are so close together, we'll suppress some of them; but here is not the case definitely.



There is a property "SuppressPartialLabels" on the text style that defines whether suppress some label which rendered across two tiles. Or else some of the labels maybe cut for some reason.



Here is the code how to disable "SuppressPartialLabels":Layer.ZoomLevelSet.ZoomLevel12.DefaultTextStyle.SuppressPartialLabels = false;


Also, I'm not sure what's your code like; I recommend rendering labels in dynamic overlay, and the label won't be cutoff. The key code is attached here:renderMap.LoadLayers(Map1.StaticOverlay.Layers, Map1.DynamicOverlay.Layers);


If you have any questions please let me know.



Thanks,

Howard



 



The street label layer was loaded via the RenderMap.LoadLayers() method supplied in the WorldMapKit demo.


I'll dig deeper in the method to see where the street layer is being loaded.


I'll try your two suggestions and let you know of my results.



Bob,  
  
 Okay! The simplest way is to replace all the false to true, because the cut labels only happens in the multi-tile type overlays. In the code above, labels are only renders in the dynamic overlay which is single tile overlay. On the other hand, I’ll let you know when I can find the exactly code.  
  
 Any questions please let me know. 
  
 Thanks, 
 Howard