Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9064019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:08:37+00:00 2026-06-16T16:08:37+00:00

I am trying to find my way using SVGKit (https://github.com/SVGKit/SVGKit) for an iOS project

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:08:38+00:00Added an answer on June 16, 2026 at 4:08 pm

    When you find the CALayer, cast it to a CAShapeLayer (if you can; if you have the right layer, this should work fine).

    if( [layer isKindOfClass:[CAShapeLayer class]] )
    {
       CAShapeLayer* shapeLayer = (CAShapeLayer*) layer;
    
       // Now you have access to lots more Apple methods
    }
    

    Then you can chnage the line width, fill color, etc – all sorts of funky stuff.

    Also look into CALayer.shadow* – various features from Apple there that will automatically hilight the visible parts of a layer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to find a way to do this query using a
I am using http://code.google.com/p/jquery-ui-map/ I am trying to find a way when looping through
I'm trying to find a way using the Office.Interop.Outlook COM object to connect to
I'm trying to find a way to make this smaller by using functions/variables in
I am trying to find a way to animate a div using jQuery to
I'm using Eclipse / PyDev trying to find a way to debug code that
I'm trying to find a way to remove zombie locks using the Subversion command
I've been trying to find a way to write to a file when using
I'm trying to find a way to integrate my website, coded using Symfony with
I'm trying to find a way to maximize & minimize a certain application using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.