This is a migrated thread and some comments may be shown as answers.
how to show the pin point to the map
3 Answers 67 Views
Map
This is a migrated thread and some comments may be shown as answers.
Asiq Raja
Top achievements
Rank 1
Asiq Raja asked on 20 Oct 2010, 08:05 AM
Hi ,
        I m really struggling with this problem, actually i retrieve the values from the database, but i want to show the pinpoint on the map based on the given latitude,longitude. i m using Dynamic layer so  i don't know how to bind the latitude,longitude,and style( in this style i write the style of the pinpoint shape).

E.g:-
                ControlTemplate objtemp = new ControlTemplate();
                ContentControl Gpsvalue = new ContentControl();
                
                string styleName = DefaultStyle;                

                try
                {
                    Gpsvalue.Style = this.radMap1.Resources[styleName] as Style;
                }
                catch (Exception exception)
                {
                    Gpsvalue.Style = this.radMap1.Resources["GreenStyle"] as Style;
                }
          // here i bind the location property
                Gpsvalue.SetValue(MapLayer.LocationProperty, new Location(Convert.ToDouble(-29.8570032), Convert.ToDouble(31.0247936)));

but still i did't get solution, i think i need to do one more step, but i don't know, now i really want to know how to integrate the  GPsValue to the given  layer.

please tell me  as soon as possible.

THanks

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 22 Oct 2010, 10:55 AM
Hi Asiq Raja,

It is quite difficult to answer your question just having a code snippet you've sent. But I would suppose that you didn't add Gpsvalue to the layer items. Your code should have something like that:
this.informationLayer.Items.Add(Gpsvalue);

I am not sure how you are using the Dynamic layer in your application. Usually it uses the DynamicSource property with a class which implements the IMapDynamicSource interface that has functionality for adding items to the layer using callback.
I would recommend you to take a look to the following documentation topics and online examples:
http://www.telerik.com/help/silverlight/map-adding-framework-elements.html
http://www.telerik.com/help/silverlight/map-using-dynamic-layer.html
http://demos.telerik.com/silverlight/#Map/DynamicLayer

Regards,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Asiq Raja
Top achievements
Rank 1
answered on 25 Oct 2010, 11:23 AM
Hi,

      Thanks you very much for your reply, and its working,

And now i m trying to do the next level like. when i click the map,  or when i zooming in to the map, i want to separate the levels like, Area wise and place wise, When i zooming into the map, with some of the zoom level the map ll display the pushpin for area wise, when i again moved in to any one area, then its ll show what are the place are available in within the area( this should be in push pins), so Can u tell me how to do this, i try with mouse click event in zoom level, but the image is not changing. i don't know what to do.
0
Andrey
Telerik team
answered on 27 Oct 2010, 10:14 AM
Hi Asiq Raja,

You should use DynamicLayer to implement your scenario. Please, take a look into the following topic in the documentation:

http://www.telerik.com/help/silverlight/map-using-dynamic-layer.html

and this example:

http://demos.telerik.com/silverlight/#Map/DynamicLayer

Greetings,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
Asiq Raja
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Asiq Raja
Top achievements
Rank 1
Share this question
or