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

  • SEARCH
  • Home
  • 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 7698867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:20:38+00:00 2026-05-31T22:20:38+00:00

Hello my main issue is how to use MKAnnotationView to set a custom pin

  • 0

Hello my main issue is how to use MKAnnotationView to set a custom pin image for all my coordinate points.

For reference, I’ve went ahead and hardcoded values that I will normally be calling down from a json webservice call.
Heres an example of a hardcoded trails:

CLLocationCoordinate2D[] trail1 = new CLLocationCoordinate2D[]{
new CLLocationCoordinate2D(10.74812, -97.330277),
new CLLocationCoordinate2D(10.74501, -97.350277),
new CLLocationCoordinate2D(10.74912, -97.340277),
};

CLLocationCoordinate2D[] trail2 = new CLLocationCoordinate2D[]{
new CLLocationCoordinate2D(10.84812, -97.331277),
new CLLocationCoordinate2D(10.94501, -97.352277),
new CLLocationCoordinate2D(10.14912, -97.343277),
new CLLocationCoordinate2D(10.12912, -97.313277),    
};

mapview.AddAnnotation (new SampleMapAnnotation (trail1));

Right now I am using MKAnnotation but realized I need to use the MKAnnotationView for custom image pins.

public class SampleMapAnnotation : MKAnnotation 
{
string _title;

public SampleMapAnnotation (CLLocationCoordinate2D coordinate)
{
Coordinate = coordinate;
_title = "Sample";
}

public override CLLocationCoordinate2D Coordinate { get; set; }

public override string Title
        {
            get {
                return _title;
        }
    }
}
  • 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-05-31T22:20:39+00:00Added an answer on May 31, 2026 at 10:20 pm

    Have a look at the MapCallout sample from Xamarin. This is a C# port from the Objective-C sample by Apple. It will show you how to create image-based annotations and show them on a map.

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

Sidebar

Related Questions

Hello all I hope someone can help me resolve this issue.. I'm curious as
main() { printf(Hello World.); } Why does no warning is produced in gcc compiler
What does the colon mean in the following Perl program? MAIN: { print Hello\n;
int main(void) { char *p = hello; char *q = world; *p = *q;
I am trying to do the following: function main(callback) { $.ajax('server-side', function() { this.callback.call(hello);
C:\>irb irb(main):001:0> s = Proc.new { puts Hello } => #<Proc:0x04051780@(irb):1> irb(main):002:0> s.call Hello
I just started learning C, and wrote my hello world program: #include <stdio.h> main()
I just started learning C, and wrote my hello world program: #include <stdio.h> main()
I have following simple program: import std.stdio; int main(string[] argv) { writeln(Hello, world!); return
#include<stdio.h> int main() { char a[5]=hello; puts(a); //prints hello } Why does the code

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.