Hi,
When I updated my project Im getting these errors.
"no suitable method found to override " for all function.
How can i fix the problem ?
When I updated my project Im getting these errors.
"no suitable method found to override " for all function.
How can i fix the problem ?
public
class
YahooProvider : MapProviderBase
{
public
MapMode Mode =
new
MapMode();
public
bool
LabelVisible;
public
string
Language =
"en"
;
public
string
VersionYahooMap =
"4.3"
;
public
string
VersionYahooSatellite =
"1.9"
;
public
string
VersionYahooLabels =
"4.3"
;
public
string
mapServiceUrl {
get
;
set
; }
public
string
Token {
get
;
set
; }
public
YahooProvider(MapMode mode,
bool
labelVisible) :
base
(mode, labelVisible)
{
Mode = mode;
LabelVisible = labelVisible;
mapServiceUrl = @
"map{0}.pergo.com.tr"
;
}
public
override
MapProviderBase GetSource(MapMode mode,
bool
isLabelVisible)
{
return
this
;
}
public
override
ISpatialReference SpatialReference
{
get
{
return
new
MercatorProjection();
}
}
public
override
Size TileSize
{
get
{
return
new
Size(
base
.TileSize.Width,
base
.TileSize.Height);
}
}
public
override
Uri GetTile(
int
tileLevel,
int
tilePositionX,
int
tilePositionY)
{
int
zoomLevel =
this
.ConvertTileToZoomLevel(tileLevel);
string
URL =
""
;
if
(Mode == MapMode.Road)
URL =
string
.Format(
"http://maps{0}.yimg.com/hx/tl?v={1}&.intl={2}&x={3}&y={4}&z={5}&r=1"
, ((GetServerNum(tilePositionX, tilePositionY, 2)) + 1), VersionYahooMap, Language, tilePositionX, (((1 << zoomLevel) >> 1) - 1 - tilePositionY), (zoomLevel + 1));
else
if
(Mode == MapMode.Aerial)
URL =
string
.Format(
"http://maps{0}.yimg.com/ae/ximg?v={1}&t=a&s=256&.intl={2}&x={3}&y={4}&z={5}&r=1"
, 3, VersionYahooSatellite, Language, tilePositionX, (((1 << zoomLevel) >> 1) - 1 - tilePositionY), (zoomLevel + 1));
else
URL =
string
.Format(
"http://maps{0}.yimg.com/hx/tl?v={1}&t=h&.intl={2}&x={3}&y={4}&z={5}&r=1"
, 1, VersionYahooLabels, Language, tilePositionX, (((1 << zoomLevel) >> 1) - 1 - tilePositionY), (zoomLevel + 1));
return
new
Uri(URL);
}
internal
int
GetServerNum(
int
tilePositionX,
int
tilePositionY,
int
max)
{
return
(tilePositionX + 2 * tilePositionY) % max;
}
private
bool
initialized;
public
override
void
Initialize()
{
this
.initialized =
this
.IsInitialized;
}
private
System.Collections.Generic.IEnumerable<MapMode> SupportedMode_;
public
override
System.Collections.Generic.IEnumerable<MapMode> SupportedModes
{
get
{
if
(SupportedMode_ ==
null
)
{
SupportedMode_ =
new
Collection<MapMode>();
}
return
SupportedMode_;
}
}
public
override
bool
IsLabelSupported
{
get
{
return
false
; }
}
public
override
bool
IsModeSupported(MapMode mode)
{
return
true
;
}
public
override
int
MaxZoomLevel
{
get
{
return
base
.MaxZoomLevel;
}
set
{
base
.MaxZoomLevel = value;
}
}
public
override
int
MinZoomLevel
{
get
{
return
base
.MinZoomLevel;
}
set
{
base
.MinZoomLevel = value;
}
}
protected
override
bool
IsValidTileLevel(
int
tileLevel)
{
return
base
.IsValidTileLevel(tileLevel);
}
protected
override
void
OnMapModeChanged(MapMode oldMode, MapMode newMode)
{
}
public
override
LocationRect CoordinateBounds
{
get
{
return
base
.CoordinateBounds;
}
}
}