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

Geocoding requires reference to Map?

3 Answers 67 Views
Map
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 03 Aug 2010, 12:42 PM
Hi,

I tried playing with the RadMap a bit today and it's really cool. However, I noticed that when doing a geocoding if I don't set the MapControl property for the provider I get some exception. Is this property really required? I mean, in a MVVM scenario you'd usually not have a reference to the map control in the ViewModel.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 04 Aug 2010, 01:27 PM
Hello Adrian,

This behavior is a result of the integration between services and map control made for usability purposes.
The geocoding, routing and search services are designed for using with RadMap control instance. They use RadMap data such as distance unit to provide requests using already specified properties of RadMap. Also the response contains useful information like to the "best view" rectangle for returned data. It required the MapControl, because it depends on a size of the map viewport.

Could you, please, explain your scenario in more details, so we can provide you with further assistance?

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
Ken
Top achievements
Rank 1
answered on 04 Aug 2010, 03:42 PM
Hi Andrey,

My scenario is a pretty straightforward case of MVVM. I have a view which contains the RadMap and a view-model for it. The view-model would ideally make the webservice-calls and expose results as properties (e.g. Location, RoutePoints etc) to which the view/RadMap binds.

Currently I have it working but for this I'm using the Bing services directly and was just a bit confused about the map dependency (also, the exception didn't help much).

So I guess this behavior is by design :)

Thanks,
Adrian
0
Andrey
Telerik team
answered on 09 Aug 2010, 08:50 AM
Hello Adrian,

We will change this behavior in the future releases. You can check when this functionality will be available using our PITS:

http://www.telerik.com/support/pits.aspx#/public/silverlight/2986

Best wishes,
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
Ken
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Ken
Top achievements
Rank 1
Share this question
or