Hi,
I have an application that access a couple custom map providers. I have now upgraded to Q1 2011 and am trying to use the multiple tile providers option.
Previously I would switch using the following code, which works fine:
Now I tried the following, which doesn't work:
The map loads the first time with the OpenStreet and custom provider one but switching to the second one doesn't cause anything to change. The map stays the same as if nothing had happened. I would have expected that I could switch between the different sets of map providers.
Is this a bug? Is there a work around for the issue that I could use until a bug fix is made available?
I have also tried just setting the map.Provider directly afterwards and it didn't make any difference either.
Cheers,
Clint
I have an application that access a couple custom map providers. I have now upgraded to Q1 2011 and am trying to use the multiple tile providers option.
Previously I would switch using the following code, which works fine:
switch
(mapProvider)
{
case
MapProviders.Provider1:
map.Provider =
new
Provider1();
break
;
case
MapProviders.Provider2:
map.Provider =
new
Provider2();
break
;
}
Now I tried the following, which doesn't work:
switch
(mapProvider)
{
case
MapProviders.Provider1:
{
map.Providers.Clear();
map.Providers.Add(
new
OpenStreetMapProvider());
map.Providers.Add(
new
Provider1());
}
break
;
case
MapProviders.Provider2:
{
map.Providers.Clear();
map.Providers.Add(
new
OpenStreetMapProvider());
map.Providers.Add(
new
Provider2());
}
break
;
}
The map loads the first time with the OpenStreet and custom provider one but switching to the second one doesn't cause anything to change. The map stays the same as if nothing had happened. I would have expected that I could switch between the different sets of map providers.
Is this a bug? Is there a work around for the issue that I could use until a bug fix is made available?
I have also tried just setting the map.Provider directly afterwards and it didn't make any difference either.
Cheers,
Clint