加载WMS以扩大混乱

时间:2019-06-17 10:12:02

标签: mapbox openlayers mapbox-ios

我使用了mapbox-ios SDK,加载了已发布geosever的WMS服务,然后开始缩小。

我的同事使用openLayers imageWMS完整加载了,为什么要以这种方式使用mapbox?

NSString * moreUrl = [NSString stringWithFormat:@"http://154.143.8.162:8000/geoserver/workspaceTest/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%%2Fpng&TRANSPARENT=true&exceptions=application%%2Fvnd.ogc.se_inimage&SRS=EPSG%%3A3857&WIDTH=256&HEIGHT=256&BBOX={bbox-epsg-3857}&sld=http%%3A%%2F%%2F192.168.8.254%%3A8080%%2Fgeoserver%%2Fstyles%%2Fperson_point_heat.sld&CQL_FILTER=WITHIN(GEOM,%%20SRID%%20=%%203857;%%20MULTIPOLYGON%@)",coordString];

MGLRasterTileSource * rasterSource = [[MGLRasterTileSource alloc] initWithIdentifier:@"ceshi1" tileURLTemplates:@[moreUrl] options:@{MGLTileSourceOptionTileSize: @256}];
    [self.mapView.style addSource:rasterSource];
    MGLRasterStyleLayer * rasterLayer = [[MGLRasterStyleLayer alloc] initWithIdentifier:@"ceshi1" source:rasterSource];
    [self.mapView.style addLayer:rasterLayer];

0 个答案:

没有答案