Ipad 使用WhirlyGlobeComponet在地球上创建纬度线时出现的问题

Ipad 使用WhirlyGlobeComponet在地球上创建纬度线时出现的问题,ipad,cocoa-touch,ios6,opengl-es,Ipad,Cocoa Touch,Ios6,Opengl Es,我正在开发WhirlyGlobe组件测试器应用程序(Mousebard团队为ios中的globe应用程序开发的伟大框架),并尝试创建纬度和经度。我已经使用以下方法在地球上创建了经度:-(void)addGreatCircles:(LocationInfo*)locations len:(int)len stride:(int)stride offset:(int)offset 并在数组中指定值:LocationInfo locations[NumLocations]但是当我尝试在地球上创建纬度

我正在开发WhirlyGlobe组件测试器应用程序(Mousebard团队为ios中的globe应用程序开发的伟大框架),并尝试创建纬度和经度。我已经使用以下方法在地球上创建了经度:
-(void)addGreatCircles:(LocationInfo*)locations len:(int)len stride:(int)stride offset:(int)offset
并在数组中指定值:
LocationInfo locations[NumLocations]
但是当我尝试在地球上创建纬度时,通过在数组中指定坐标:

LocationInfo locations[NumLocations] = {
{"twenty five",0, 180},
{"twenty six",0, -10}
 // {"three",30,180.0},
 //  {"four",30,0},
// {"five",60, 180},
 //{"six",60, 0},
}
还有儿子。。。我只能得到地球上一半的纬度线。我不知道为什么会出现这个问题。这是因为OpenGL还是什么。请有人帮我正确地处理它。 当我给出起点(0,-180)和终点(0,0)时,屏幕截图如图-1,2所示:

图-1

图-2

我需要的是在地球上画出完整的纬度线。使用起点(0,0)到终点(0360)给我一个空白输出(地球上没有画线)。
我已经尝试了起点(0,10)终点(0,-10),所以这条线覆盖了整个地球,但还没有成功。请帮助大家

首先,您需要转到github上的develop分支。这就是即将发布的2.2版

我已经在测试应用程序中添加了一个例子,可以完全做到这一点

我们就是这样做到的

- (void)addLinesLon:(float)lonDelta lat:(float)latDelta color:(UIColor *)color
{
    NSMutableArray *vectors = [[NSMutableArray alloc] init];
    NSDictionary *desc = @{kMaplyColor: color, kMaplySubdivType: kMaplySubdivSimple, kMaplySubdivEpsilon: @(0.001), kMaplyVecWidth: @(4.0), kMaplyDrawPriority: @(1000)};
    // Longitude lines
    for (float lon = -180;lon < 180;lon += lonDelta)
    {
        MaplyCoordinate coords[3];
        coords[0] = MaplyCoordinateMakeWithDegrees(lon, -90);
        coords[1] = MaplyCoordinateMakeWithDegrees(lon, 0);
        coords[2] = MaplyCoordinateMakeWithDegrees(lon, +90);
        MaplyVectorObject *vec = [[MaplyVectorObject alloc] initWithLineString:coords numCoords:3 attributes:nil];
        [vectors addObject:vec];
    }
    // Latitude lines
    for (float lat = -90;lat < 90;lat += latDelta)
    {
        MaplyCoordinate coords[5];
        coords[0] = MaplyCoordinateMakeWithDegrees(-180, lat);
        coords[1] = MaplyCoordinateMakeWithDegrees(-90, lat);
        coords[2] = MaplyCoordinateMakeWithDegrees(0, lat);
        coords[3] = MaplyCoordinateMakeWithDegrees(90, lat);
        coords[4] = MaplyCoordinateMakeWithDegrees(+180, lat);
        MaplyVectorObject *vec = [[MaplyVectorObject alloc] initWithLineString:coords numCoords:5 attributes:nil];
        [vectors addObject:vec];
    }

    latLonObj = [baseViewC addVectors:vectors desc:desc];
}
-(void)addLinesLon:(float)lonDelta lat:(float)latDelta color:(UIColor*)color
{
NSMutableArray*向量=[[NSMutableArray alloc]init];
NSDictionary*desc={kMaplyColor:color,kMaplySubdivType:kMaplySubdivSimple,kMaplySubdivEpsilon:@(0.001),kMaplyVecWidth:@(4.0),kMaplyDrawPriority:@(1000)};
//经线
对于(浮点lon=-180;lon<180;lon+=lonDelta)
{
MaplyCoordinate坐标[3];
坐标[0]=与度(lon,-90)的映射坐标;
coords[1]=MaplyCoordinateMakeWithDegrees(lon,0);
坐标[2]=与度(lon,+90)的映射坐标;
MaplyVectorObject*vec=[[MaplyVectorObject alloc]initWithLineString:coords numCoords:3个属性:nil];
[vectors addObject:vec];
}
//纬度线
对于(浮动纬度=-90;纬度<90;纬度+=纬度增量)
{
MaplyCoordinate coords[5];
坐标[0]=MaplyCoordinateMakeWithDegrees(-180,lat);
坐标[1]=MaplyCoordinateMakeWithDegrees(-90,lat);
坐标[2]=与度(0,lat)的映射坐标;
坐标[3]=与度(90,纬度)的地图坐标;
坐标[4]=MaplyCoordinateMakeWithDegrees(+180,lat);
MaplyVectorObject*vec=[[MaplyVectorObject alloc]initWithLineString:coords numCoords:5个属性:nil];
[vectors addObject:vec];
}
latLonObj=[baseViewC addVectors:vectors desc:desc];
}
WhirlyGlobe Maply 2.2为矢量渲染和细分添加了一些技巧。现在,您可以告诉工具箱将行细分为一个ε,以使其可接受。我们还可以在另一事物之上呈现一个事物,而不必担心z缓冲。好了,现在很容易了


这里唯一真正的诡计是我们必须把线分成几段。我们至少需要三个点,否则细分逻辑将只检测退化情况。latitude的5点行工作了一些错误测试逻辑。

感谢您的快速响应。我肯定会开始开发分支。通过添加上述代码进行检查。我是否需要将此代码直接添加到TestViewController,并在需要的地方调用此方法?希望很快看到新2.2版本中的更改。一个上午的问题是我“面向”是指点击详图索引/覆盖视图。它不接受点击十字按钮。对此,我应该怎么做。我已经添加了上面问题本身的截图。图5显示了我面临的问题。我也需要一个关于这个问题的建议。谢谢!!我不知道你的电话是怎么回事。你可以看看这个:你能更详细地解释一下我需要在哪里做你在问题中建议的更改吗?是在testviewcontroller中,还是在TapDelegate.mm中,还是在一些eagleview文件中??我曾经经历过这样的情况:但这并没有得出任何实质性的结论1.我自己也没有遇到过这个问题,所以我不太清楚他在那里干什么。我有一些应用程序对重叠视图中的点击做出响应,所以我不太清楚为什么会发生这种情况。