AGSSpatialReference *sr = [[AGSSpatialReference alloc] initWithWKID:102017 WKT:@PROJCS[\North_Pole_Lambert_Azimuthal_Equal_Area\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",-95],PARAMETER[\"Latitude_Of_Origin\",40],UNIT[\"Kilometer\",1000]]"]; AGSEnvelope *env = [AGSEnvelope envelopeWithXmin:-2500 ymin:-1500 xmax:2500 ymax:1500 spatialReference:sr]; AGSGraphicsLayer* glayer = [AGSGraphicsLayer graphicsLayer]; glayer.initialEnvelope = env; UIView<AGSLayerView>* lyrView = [self.mapView addMapLayer:glayer withName:@Graphics Layer]; AGSMutablePolyline *poly = [[AGSMutablePolyline alloc] initWithSpatialReference:sr]; [poly addPathToPolyline]; // points add to the polyline AGSSymbol* s = [[AGSSimpleLineSymbol alloc] initWithColor:[UIColor redColor] width:10.0f]; AGSGraphic* g = [[AGSGraphic alloc] initWithGeometry:poly symbol:s attributes:nil infoTemplateDelegate:nil]; [glayer addGraphic:g]; [glayer dataChanged];
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.