Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Mobile-Applications MKMapView Change Red Pin Color
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
MKMapView Change Red Pin Color
1 Answer(s)      3 years and 10 months ago
Posted in : MobileApplications


MKMapView Change Pin Color

Hi, in my iphone map view application, i displayed the image on annotation instead of custom pin. But however on click it changes to red color pin. Can any one please tell me how can i show the same image ever after it's taped.


Advertisement
View Answers

February 12, 2011 at 12:18 PM


MKMapView changes to Red Pin on Tapping

This is a MKAnnotationView issue. Use MKAnnotationView instead of MKPinAnnotationView. And set the custom image. It will fix the problem.

or See the code below...

- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
//I think here you will be adding a annotation(my assumption)
[mapView addAnnotation:yourAnnotation];
//This will call viewForAnnotation again
}


- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
//If you didnt specify the a image for the annotation the default pin image will be assigned here..
}

Whenever we click on a annotation it call the delegate. So, you need to set your image into it.



Related Tutorials/Questions & Answers:
MKMapView Change Red Pin Color
MKMapView Change Red Pin Color  MKMapView Change Pin Color Hi... of custom pin. But however on click it changes to red color pin. Can any one please...;MKMapView changes to Red Pin on Tapping This is a MKAnnotationView issue. Use
color change
color change  how to change the color in circle using scrollbar
Advertisements
change color according to the database value
change color according to the database value  any one know how to get values from database ( 1 or 0 ) and according to that change the color ( red or green) of given list
change player dress color
change player dress color  Hai friends, Can we change player dress color using J2ME. Please provide me an code for this. I can able to attain three colors only. Send the code to mail id. vijaikiranit@gmail.com
how to change color of titlebar in java
how to change color of titlebar in java  pls help
To change the color of text hyperlinks midway
To change the color of text hyperlinks midway   Is there a way to change the color of text hyperlinks midway through a page? If so, what code do I use
To change the color of text hyperlinks midway
To change the color of text hyperlinks midway   Is there a way to change the color of text hyperlinks midway through a page? If so, what code do I use
To change the color of text hyperlinks midway
To change the color of text hyperlinks midway   Is there a way to change the color of text hyperlinks midway through a page? If so, what code do I use
Change background color of text box - Java Beginners
Change background color of text box  Hi how can i change the background color to red of Javascript text box when ever user enters an incorrect value while on entering a correct value its background color should change green
change one type of color in between more colors
How to change one type of color in between more colors... to change one type of color in more than one color, It is so easy to make this example... color area to change another color. Color Balance: Now change the color
Change the color of the selected tab
Change the color of the selected tab Swing provides different methods to give color effects which gives a presentable look to the components. In this section, you will learn how to change the color of the selected tab. For this, we have
change color of back ground using switch
change color of back ground using switch   how to change back ground color according to day using switch case
Here is a set of 26 different shades of one of the most favourite Red colors
favourite Red colors rangeing from light Red color to darker Red color... .menuText1 { font:10pt bold Arial, Helvetica, sans-serif; color:#FFFFFF... bold Arial, Helvetica, sans-serif; color:#000000; text-align:left; padding
how do you change the message box to a specific color
how do you change the message box to a specific color  How do you change the message box color to a specific color? I can get the color to change with each input but i cant give it a specific color. Example I'm trying to change
How can I change UIButton title color?
How can I change UIButton title color?  Hi, I have a button in my iPhone/iPad application. I want to change the color of the text when user clicks..., You have to set the color of the button for a particular state say
How to change the color of a base64-encoded png image JQuery?
How to change the color of a base64-encoded png image JQuery?  I am going to change the colors of the pixels of a png image(which is in base64 format.... the original image is shown, but the color does not change. Do you know why
JavaScript change background color automatically
JavaScript change background color automatically In this section, you will learn how to change the background color of the web page automatically. Now..., we have used using the Math.random(). The window.setTimeout() function change
to change the styleclass color of <apex:outputlabel > onclick button function in javascript
, then through javascript how can we change the color of outputlabel to red color .my { color: Black; font-size: 10px; font-family: Arial...to change the styleclass color of onclick button function in javascript 
how to change div background color in javascript
how to change div background color in javascript  how to change div background color in javascript ?   <div id="Name">   <div class="content">      <h2>Your Name here</h2>       <p>First
Java Servlet Change Background Color
Java Servlet Change Background Color You can provide an effective way to the web page by changing the background color of the web page. In servlet, you can do this by using javascript. Here, we are going to change the background color
Change Color and Font of text
Change Color and Font of text       This section illustrates you how to change color... to render text and the TextAttribute.FOREGROUND sets the color. The values
mkmapview zoom to current location
mkmapview zoom to current location  How can i zoom map to the current location
how to change background color in dojo tab container - Framework
how to change background color in dojo tab container  how to change background color in dojo tab container
servlet backgorund color change - JSP-Servlet
servlet backgorund color change  code for servlet that changes background color in every 10 seconds.  Hi Friend, Try the following code: import java.io.*; import java.sql.*; import java.util.*; import
How to change table row color when click on Hyper Link in jsp?
How to change table row color when click on Hyper Link in jsp?  I use... row2 row3.. when click on the link1 automatically change the the row1 color,similarly when click on the link2 automatically change the the row2
How to change backgroundcolor and foreground color of JLabel in Java - Java Beginners
How to change backgroundcolor and foreground color of JLabel in Java  How to change backgroundcolor and foreground color of JLabel in Java  Hi Friend, Try the following code: import java.io.*; import java.awt.
Change Background color using Custom Tag
Change Background color using Custom Tag In this program, We will create... according to your choice, this background color change is due to the custom tag...:hello color="RED">       <
UIWebView Background Color
UIWebView Background Color If you wanted to change the background color...). Where as setBackgroundColor will allow you to change the color of background area of UIWebView or UIView. This example illustrate you how to change the color
How to add UIImage on pin location MKMapKit
How to add UIImage on pin location MKMapKit  Hi, In my application, i need to add a custom image on MapView controller instead of pin. I am calling image through database "URL". Please suggest .. Thanks!   
Photoshop eye color brown to blue
;    How to change the eye color from brown to blue If you want to change the eye color but you are not able to do that then this tutorial... this. Change color: Go to Image menu > Adjustment > Color Balance and make setting
changing Chunk Color
change the color of chunk color .This example tell you how you can change the color of chunk and how you can add fonts and gives the size of the fonts... changing Chunk Color     
 

 

 

DMCA.com