FPKMap Class Reference
Inherits from | UIView |
Conforms to | FPKView MKMapViewDelegate |
Declared in | FPKMap.h FPKMap.m |
Overview
This Extension is useful to place a Google Map over the page.
Usage
- Prefix: map://
- Import: #import <FPKMap/FPKMap.h>
- String: @“FPKMap”
Prefix
map://
Resources and Parameters
- hybrid or satellite or standard
- lat = DOUBLE latitude
- lon = DOUBLE longitude
- latd = FLOAT latitude span
- lond = FLOAT longitude span
- pinlat = DOUBLE pin latitude (optional)
- pinlon = DOUBLE pin longitude (optional)
- pintitle = STRING pin title (optional)
- pinsub = STRING pin subtitle (optional)
- pincolor = STRING red or purple or green pin color (optional)
- user = BOOL show the user position (optional)
Sample url
map://hybrid?lat=45.436587&lon=12.334042&latd=0.035594&lond=0.07493&pinlat=45.438113&pinlon=12.335908&pintitle=Rialto%20Bridge&pinsub=on%20the%20Grand%20Canal&pincolor=red&user=YES
Tasks
Other Methods
-
– initWithParams:andFrame:from:
This method is called by the FPKOverlayManager if the Extension supports the requested prefix. You should return the UIView to be placed over the page. You can also return
nil
and perform some other operations like presenting a modal view on the
Other Methods
-
+ acceptedPrefixes
Get the accepted prefixes by an Extension encapsulated in an NSArray of NSString. Obviously you can support even just one prefix.
Other Methods
-
+ respondsToPrefix:
You should implement this method to return a BOOL value only on supported prefixes.
Other Methods
-
– rect
The frame of the view can change when the pdf mode change and the device is rotated. The original frame is stored to perform the conversion on the fly when needed.
Other Methods
-
– setRect:
Set the original frame. More info on rect.
Class Methods
acceptedPrefixes
Get the accepted prefixes by an Extension encapsulated in an NSArray of NSString. Obviously you can support even just one prefix.
+ (NSArray *)acceptedPrefixes
Discussion
Get the accepted prefixes by an Extension encapsulated in an NSArray of NSString. Obviously you can support even just one prefix.
[NSArray arrayWithObjects:@"map", nil];
@return
Declared In
FPKView.h
respondsToPrefix:
You should implement this method to return a BOOL value only on supported prefixes.
+ (BOOL)respondsToPrefix:(NSString *)prefix
Parameters
- prefix
The prefix in the form
@"map"
.
Return Value
YES or NO if the prefix is support by the Extension.
Discussion
You should implement this method to return a BOOL value only on supported prefixes.
Declared In
FPKView.h
Instance Methods
initWithParams:andFrame:from:
This method is called by the FPKOverlayManager if the Extension supports the requested prefix.
You should return the UIView to be placed over the page. You can also return nil
and perform some other operations like presenting a modal view on the
- (UIView *)initWithParams:(NSDictionary *)params andFrame:(CGRect)frame from:(FPKOverlayManager *)manager
Parameters
- params
This dictionary contains all the parameters extracted from the url
- prefix the part in the url before
://
- path the part in the url after
://
- params another NSDictionary that contains the parsed parameters after the
://
- resource the part before
?
- … custom parameters included in the annotation separated by
&
- resource the part before
- load YES if the call for the view is made when the pdf page is going to be loaded, NO if the call is made when the user taps on the annotation area
- prefix the part in the url before
- frame
The annotation frame in pdf page coordinates. If the
padding
parameter is specified in the url, the frame is a CGRectInset of the real annotation frame. This feature is useful if the pdf has been created with Adobe InDesign that creates the annotation 2 pixel wider than the original object. Just specify in the url a param?padding=2
and the frame will be set accordingly.
- manager
The FPKOverlayManager that can be used to perform many operations like accessing the MFDocumentViewController or the MFDocumentManager.
Return Value
UIView that will be placed over the pdf page by the FPKOverlayManager.
Discussion
This method is called by the FPKOverlayManager if the Extension supports the requested prefix.
You should return the UIView to be placed over the page. You can also return nil
and perform some other operations like presenting a modal view on the
Declared In
FPKView.h
rect
The frame of the view can change when the pdf mode change and the device is rotated. The original frame is stored to perform the conversion on the fly when needed.
- (CGRect)rect
Return Value
rect The original frame of the UIView.
Discussion
The frame of the view can change when the pdf mode change and the device is rotated. The original frame is stored to perform the conversion on the fly when needed.
Declared In
FPKView.h