Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Harry Stromfelt
2,985 PointsHow can you add a custom image for a map pin, with a transparent background?
I am trying to use my own image for a map pin but when I add it and place it on the map, I get the actual map pin I want but then the image background also covers the map. So in the end I have a map pin with a square white background.
I have looked everywhere on google but I can't seem to find out how people do it? Is there a trick that I am missing? Can you refine the image boarder to only track the map pin itself?
Thanks! Harry
2 Answers

Michael Vilabrera
Courses Plus Student 11,252 PointsThe problem is you need to paint the inside of your custom image to a transparent color. You can do it, but often finding the right tool will take time.
If you have Photoshop try starting there. Or download the image (you may see a checkerboard instead of a solid color)
Google "Transparent background image" and have a look through the images they supply.

Jason Wayne
11,688 PointsMaybe consider adding a uiimage with a transparent background. Or, you could try playing around with the alpha property of the uiimage.

Harry Stromfelt
2,985 PointsBut how can the UIImage understand what the background is verses the main image? Isn't it just going to be a 2D PNG as opposed to a layered picture like in photoshop..
Cheers for the reply