This is a migrated thread and some comments may be shown as answers.

Newbee pushpin question

2 Answers 120 Views
Map
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 27 Apr 2011, 02:25 PM
OK totally new to any type of Silverlight maps so hopefully this is a pretty basic question.

I am interested in using the United States map that comes with the Telerik SL controls named 'USA/usa_states'. I want to position pushpins, images, something at certain big city locations (no zoom required; just statically positioned US at full screen).

When I look at the documentation, the pushpins are located via coordinates like below:

<telerik:MapPinPoint telerik:MapLayer.Location="42.6957539183824, 
23.3327663758679">

OK (2) issues:

1. How in the world am I supposed to figure out the coordinates for the 10-20 major cities I want to add pins to (i.e. Chicago, New York, Atlanta, etc.)? The coordinates are so exact, do I just guess until the pin shows up in roughly the correct spot, or is there some kind of guide to get coordinates of the cities? I am using an 'Empty Provider' with a MapShapeReader to display the US .shp file.

2. Even during testing (I have the 'USA/usa_states' map loading in browser correctly using an 'Empty Provider' with a MapShapeReader), I can't get any MapPinPoint to show on top of the map. I see it when the map 1st loads, but then the map sits on top of the MapPinPoint and associated image. Any idea on how to use MapPinPoints that show on top of a map rendered using an 'Empty Provider' with a MapShapeReader to read a .shp file.

P.S. I also tried using a HotSpot as the code here (http://www.telerik.com/help/silverlight/radmap-features-information-layer-pin-points.html) suggests, but I always get the "The member 'HotSpot' is not recognized or not accessible" error when a HotSpot element is inside a MapPinPoint.

<telerik:MapPinPoint telerik:MapLayer.Location="42.6957539183824, 23.3327663758679">
    <telerik:MapPinPoint.HotSpot> <--XMAL Error here
        <telerik:HotSpot X="0.5" Y="1" />
    </telerik:MapPinPoint.HotSpot>
</telerik:MapPinPoint>


Thanks!!

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 02 May 2011, 07:13 AM
Hello Allen,

1. I think that you can get the coordinates for major US cities from internet. For example the following resource provides this information:
http://www.realestate3d.com/gps/latlong.htm
Just note, that in fact the longitudes on this page should have a negative value.

2. I would recommend to use additional information layer for displaying of MapPinPoints. It should be placed after the "state" layer in XAML code. In this case it will overlap the "state" layer.

I'm sorry, but the documentation is not updated yet. Currently the MapPinPoint does not expose a HotSpot property. But you can use the MapLayer.HotSpot attached property for the MapPinPoint the same way as for framework elements. For more information please take a look at the following topic of documentation:
http://www.telerik.com/help/silverlight/radmap-features-hot-spots.html

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
0
Allen
Top achievements
Rank 1
answered on 03 Aug 2011, 08:28 PM
This helped a lot, thank you.
Tags
Map
Asked by
Allen
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Allen
Top achievements
Rank 1
Share this question
or