I am trying to find my way using SVGKit (https://github.com/SVGKit/SVGKit) for an iOS project dealing with geographical maps.
At this point, I can access a particular area on a map using a CALayer object. That lets me access the rectangle surrounding the area.
Here is the code I use for this:
CALayer *layer=[svgView.document layerWithIdentifier:@"myLayerID"];
[layer setBackgroundColor:[UIColor orangeColor].CGColor];
if( [layer isKindOfClass:[CAShapeLayer class]] )
{
CAShapeLayer* shapeLayer = (CAShapeLayer*) layer;
NSLog(@"That is good so far!");
layer.mask=shapeLayer;
}
But I need to access the precise area of the map; not only the surrounding rectangle, in order to highlight it. I have kind of read I should use the CGPathRef and a mask.
How exactly can I do this?
Thanks for any tip.