Register  |  Login
ThinkGeo - GPS Tracking and Mapping Solutions  |  Visit the Wiki  |  Find us on: Twitter Facebook Google+ LinkedIn

Discussion Forums

The online community for users of Map Suite GIS components

ClusterPointStyle Silverlight port.
Last Post 08-16-2012 02:24 PM by Gary. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
DingmouUser is Offline
Level 1
Level 1
Posts:2
Avatar

--
04-02-2012 02:13 PM

Hi, there,

I'm checking the ClusterPointStyle from the community code page:

http://wiki.thinkgeo.com/wiki/Map_Suite_Silverlight_Edition_Styles_Samples#ClusterPointStyle

It says that this code should work with Silverlight edition.

However, when I tried to include the code in my Silverlight project, I ran into a problem that  MapSuiteTileMatrix and TileMatrixCell class does not exist in SilverlightMapSuiteCore.dll.  They are in MapSuiteCore.dll, but I can't use that in my Silverlight project.

Is there a way to add those two classes to SilverlightCore as well?  Or is there any work-around?

Thank you.

Ding

ValUser is Offline
MVP
MVP
Posts:1634
Avatar

--
04-02-2012 04:07 PM

Dingmou,

 ClusterPointStyle is not supported in SilverLight as opposed to some other editions such as Wpf. I created a ticket in our internal tracking system for the Develpment Team to look at. I will let you know their findings. Thank you.

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
04-05-2012 04:44 PM

Hello Dingmou,

This sample is created based on our Service Edition, that mean everything the sample need is in the Core and every product can use it.

In Sliverlight edition, it has a little special, you can't use it in the client side because client side use it's own core system are not totally as same as Service edition, but you can let it work at ServerSide and call it in Client side. Please check the code below:

Create it in server side:


                ClusterPointStyle clusterPointStyle = new ClusterPointStyle(PointSymbolType.Triangle,
                new GeoSolidBrush(GeoColor.FromArgb(150, GeoColor.StandardColors.Orange)),
                new GeoPen(GeoColor.StandardColors.Red, 2), 27);
                clusterPointStyle.TextStyle = new TextStyle("FeatureCount", new GeoFont("Arial", 8), new GeoSolidBrush(GeoColor.StandardColors.Black));
                clusterPointStyle.TextStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
                clusterPointStyle.TextStyle.PointPlacement = PointPlacement.Center;


                ShapeFileFeatureLayer clusterVolcanoesLayer = new ShapeFileFeatureLayer(@"..\..\Data\volcanoes.shp", ShapeFileReadWriteMode.ReadOnly);
                clusterVolcanoesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Clear();
                clusterVolcanoesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(clusterPointStyle);
                clusterVolcanoesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

                ServerLayerOverlay clusterOverlay = new ServerLayerOverlay("ServerSideClusterStyle");

                clusterOverlay.Layers.Add(clusterVolcanoesLayer);
                SilverlightMapConnector1.ServerLayerOverlays.Add(clusterOverlay);

Call it in Client side:


            ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("ServerSideClusterStyle", "SilverlightMapConnector1");
            serverLayerOverlay.IsStretchEffectDisabled = true;
            serverLayerOverlay.TileType = TileType.SingleTile;
            Map1.Overlays.Add(serverLayerOverlay);

Please feel free to let us know your queries.

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

DingmouUser is Offline
Level 1
Level 1
Posts:2
Avatar

--
08-15-2012 09:33 AM
Hi, Gary,

We're finally back to this project. Thank you for your advice.

However, we need this feature to be on client side. Do you have a plan to make it work with Silverlight Core? If you do, do you have a target version that this may be included?

Thank you.
GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
08-16-2012 02:24 PM
Hello Dingmou,

What do you mean on client side? Is that means user added or deleted the feature with client side code?

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

You are not authorized to post a reply.

Active Forums 4.2