首页 / 浏览问题 / 移动GIS / 问题详情
ios打开wms地图,地图图片显示错误
gsj
5EXP 2017年03月09日

在做ios开发的时候公司要求打开wms地图参数设置如下:

 m_ConnectionInfo = [[DatasourceConnectionInfo alloc]initDatasourceConnectionInfo];

    [m_ConnectionInfo setAlias:@"Web"];

    [m_mapControl mapControlInit];

    [[m_mapControl map] setWorkspace:m_workspace];

    [m_ConnectionInfo setServer:@"http://vmap0.tiles.osgeo.org/wms/vmap0"];

    [m_ConnectionInfo setEngineType:ET_OGC];

    [m_ConnectionInfo setDriver:@"WMS"];

    [m_ConnectionInfo setWebCoordinate:@"EPSG:4326"];

    Point2D *lbpoint2d = [[Point2D alloc]initWithX:-180.00 Y:-90.00];

    Point2D *rtpoint2d = [[Point2D alloc]initWithX:180.00 Y:90.00];

    Rectangle2D *rectangle2d = [[Rectangle2D alloc]initWithLeftBottom:lbpoint2d RightTop:rtpoint2d];

    [m_ConnectionInfo setWebBBox:rectangle2d];

    [m_ConnectionInfo setWebVersion:@"1.3.0"];

    [m_ConnectionInfo setWebVisibleLayers:@"ocean,ground_01,ground_02,population,river,stateboundary,country_01,country_02,disp,inwater"];

    

    [m_ConnectionInfo setWebFormat:@"image/jpeg"];

但是打开图片失败了,如图:

1个回答

您好,我看您的数据范围是-180 ,3.97549;-90,90.您设置这个范围看下呢
1,752EXP 2017年03月09日
...