Toggle navigation
Toggle navigation
This project
Loading...
Sign in
尹诚
/
Mapbox-iOS-SDK
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Justin R. Miller
12 years ago
Commit
3704f9f7db34cb2aae226537fda47a8faa9dcbf7
1 parent
61fcde40
leave attribution at tile source level & consider all tile sources
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
MapView/Map/RMAttributionViewController.h
MapView/Map/RMAttributionViewController.m
MapView/Map/RMAttributionViewController.h
View file @
3704f9f
...
...
@@ -13,6 +13,5 @@
@interface
RMAttributionViewController
:
UIViewController
<
UIWebViewDelegate
>
-
(
id
)
initWithMapView
:
(
RMMapView
*
)
mapView
;
-
(
id
)
initWithMapView
:(
RMMapView
*
)
mapView
customAttributionString
:(
NSString
*
)
attributionString
;
@end
...
...
MapView/Map/RMAttributionViewController.m
View file @
3704f9f
...
...
@@ -26,11 +26,6 @@
-
(
id
)
initWithMapView
:
(
RMMapView
*
)
mapView
{
return
[
self
initWithMapView
:
mapView
customAttributionString
:
nil
];
}
-
(
id
)
initWithMapView
:
(
RMMapView
*
)
mapView
customAttributionString
:
(
NSString
*
)
attributionString
{
self
=
[
super
initWithNibName
:
nil
bundle
:
nil
];
if
(
self
)
...
...
@@ -49,11 +44,22 @@
webView
.
backgroundColor
=
[
UIColor
clearColor
];
webView
.
opaque
=
NO
;
NSMutableString
*
attribution
=
[
NSMutableString
string
];
for
(
id
<
RMTileSource
>
tileSource
in
mapView
.
tileSources
)
{
if
([
tileSource
respondsToSelector
:
@selector
(
shortAttribution
)])
{
if
([
attribution
length
])
[
attribution
appendString
:
@" "
];
[
attribution
appendString
:[
tileSource
shortAttribution
]];
}
}
NSString
*
attribution
=
[
mapView
.
tileSource
shortAttribution
];
if
(
!
attribution
)
attribution
=
(
attributionString
?
attributionString
:
@"Map data © OpenStreetMap contributors <a href=
\"
http://mapbox.com/about/maps/
\"
>(Details)</a>"
);
if
(
!
[
attribution
length
])
[
attribution
setString
:
@"Map data © OpenStreetMap contributors <a href=
\"
http://mapbox.com/about/maps/
\"
>(Details)</a>"
];
NSMutableString
*
contentString
=
[
NSMutableString
string
];
...
...
Please
register
or
login
to post a comment