AGSPictureMarkerSymbol becomes distorted after upgrading to SDK to 10.1.1

705
3
07-05-2013 11:11 AM
OguzhanTopsakal
New Contributor III
The quality of the image drawn on the map becomes significantly low for the same code after upgrading the SDK to 10.1.1. I copy/paste the code below.
Orange.png is a 90x90 pixel image. Its size is adjusted based on the diameter parameter. As the diameter gets smaller, the image's quality becomes lower.

Should I use a bigger image?
Is there any parameters that I need to set to improve the quality? (I tried setting graphicsLayer.renderNativeResolution to FALSE/TRUE but it did not change anything..)


    NSString *imageName = @"Orange.png";
    // Creates a custom marker symbol with the picture
    AGSPictureMarkerSymbol *myMarkerSymbol = [AGSPictureMarkerSymbol pictureMarkerSymbolWithImageNamed:imageName];
    // Adjust the size for the node
    myMarkerSymbol.size = CGSizeMake( diameter, diameter );
    
    // Converts latitude and longitude values to mercator
 double num = longtitude * 0.017453292519943295;
 double x = 6378137.0 * num;
 double a = latitude * 0.017453292519943295;
 double mercatorX = x;
 double mercatorY = 3189068.5 * log((1.0 + sin(a))/(1.0 - sin(a)));
 
 //Create an AGSPoint (which inherits from AGSGeometry) that
 //defines where the Graphic will be drawn
 AGSPoint* myMarkerPoint = [AGSPoint pointWithX:mercatorX
             y:mercatorY
          spatialReference:self.mapView.spatialReference];
    
    //NodeInfoTemplate handles what needs to be written in the callout window
 NodeInfoTemplate *template = [[NodeInfoTemplate alloc] init];
 //Create the Graphic, using the symbol and geometry created earlier
 AGSGraphic* myGraphic =[AGSGraphic graphicWithGeometry:myMarkerPoint
             symbol:myMarkerSymbol
            attributes:nodeDict
           infoTemplateDelegate:template];
    
 //Add the graphic to the Graphics layer
 [self.graphicsLayer addGraphic:myGraphic];
0 Kudos
3 Replies
DiveshGoyal
Esri Regular Contributor
Can you provide the Orange.png image you are using ?

Also attach screenshots showing the difference in quality.
0 Kudos
OguzhanTopsakal
New Contributor III
Thanks for your reply. Please see the attachments.
0 Kudos
OguzhanTopsakal
New Contributor III
Hi Divesh,

Do you know any ideas or a solution for this. Can we expect a fix soon for this or do we need to use AGSSimpleMarkerSymbol instead of AGSPictureMarkerSymbol for now?

Thanks,
Oguzhan.
0 Kudos