简体   繁体   中英

iOS + ArcGIS SDK. `AGSPictureMarkerSymbol*` shows on simulator, but doesn't on device

I can show a AGSPictureMarkerSymbol* on iOS 6.1 simulator, but when running in debug with the device (iPhone 4, iOS 6.1), even though the code is "read" and no warning or exception appears, the marker just doesn't appear. The code is the following:

AGSPictureMarkerSymbol* locker = [[AGSPictureMarkerSymbol alloc] initWithImageNamed:@"locker.png"];  
AGSPoint* point = [[AGSPoint alloc] initWithX:coord.x y:coord.y spatialReference:self.mapView.spatialReference];
[self.lockersLayer addGraphic:[[AGSGraphic alloc] initWithGeometry:point symbol:locker attributes:nil infoTemplateDelegate:nil]];

As a reference, this self.lockersLayer has also lots of AGSTextSymbol* and they show up just fine.

Thank you.

The problem was with the locker.png file. Don't know exactly what the problem was, but after changing it to another image, it started showing up on the device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM