AGSPictureMarkerSymbol *myMarkerSymbol = [AGSPictureMarkerSymbol pictureMarkerSymbolWithImageNamed:@Pushpin.png]; myMarkerSymbol.color = [UIColor redColor]; [AGSPoint pointWithX:32.0636 y:34.7922 spatialReference:[AGSSpatialReference spatialReferenceWithWKID:43276]]; AGSGraphic* myGraphic = [AGSGraphic graphicWithGeometry:myMarkerPoint symbol:myMarkerSymbol attributes:nil infoTemplateDelegate:nil]; [myGraphic addGraphic:myGraphic]; [self.myGraphicsLayer dataChanged]; [self.mapView addMapLayer:self.myGraphicsLayer withName:@test];
//add graphics layer first the map [self.mapView addMapLayer:self.myGraphicsLayer withName:@test]; //then add graphic to graphics layer AGSPictureMarkerSymbol *myMarkerSymbol = [AGSPictureMarkerSymbol pictureMarkerSymbolWithImageNamed:@Pushpin.png]; myMarkerSymbol.color = [UIColor redColor]; [AGSPoint pointWithX:32.0636 y:34.7922 spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]; AGSGraphic* myGraphic = [AGSGraphic graphicWithGeometry:myMarkerPoint symbol:myMarkerSymbol attributes:nil infoTemplateDelegate:nil]; [self.myGraphicsLayeraddGraphic:myGraphic]; [self.myGraphicsLayer dataChanged];
myGraphicsLayer
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.