POST
|
Here is a sample request: curl -H 'Host: gisrevprxy.seattle.gov' -H 'Cookie: _ga=GA1.2.2038253137.1438151140' -H 'Accept: image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6' -H 'Accept-Language: en-us' -H 'DNT: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' —compressed 'http://gisrevprxy.seattle.gov/ArcGIS/rest/services/SDOT_EXT/sdot_parking/MapServer/export?dpi=96&transparent=true&format=png8&layers=show%3A1%2C7%2C5%2C6%2C8%2C9&bbox=1269709.0806366669%2C229815.14997666667%2C1271497.6223033334%2C230722.44164333335&bboxSR=2926&imageSR=2926&size=1717%2C871&f=image'
Here is the returned image 1) Is there any way to turn on anti-aliasing on those lines through a REST request? 2) If not, is it possible to draw them myself given a data set from the REST API, is it possible to access it?
... View more
03-30-2018
01:32 AM
|
0
|
0
|
447
|
POST
|
Hi Mark, thanks for the replies. 1) Is there a tool to visualize extents given a spatial reference? Like an online visualizer, or perhaps some QuickLook debug view implemented on AGSEnvelope? 2) Can you give me an example of how to limit labels to a specific extent in an ArcGIS map? The interface on ArcGIS online does not seem to work for setting an extent. Say I create a baseman with a base layer of https://gisrevprxy.seattle.gov/ArcGIS/rest/services/ext/SP_CityBM_Roads/MapServer/ And then I add my own layer based on a version of http://www.arcgis.com/home/item.html?id=87fcdf91a0f14e4a9fda40a763c6f2b8 in which the style is modified to only show the labels. I see the tiles from that base server showing the state of WA, but then I still see the labels for the entire world. I am unsure what the actual extent of my base layer is and if I can override it locally from the SDK. (lldb) po [self.mapView.map.basemap.baseLayers valueForKey:@"fullExtent"]
<__NSSingleObjectArrayI 0x6040000139a0>(
AGSEnvelope: [(664166.810939, -527832.500274), (2636447.251560, 751797.062774)], sr: 2926
)
(lldb) po [self.mapView.map.basemap.referenceLayers valueForKey:@"fullExtent"]
<__NSArrayI 0x6080002329a0>(
AGSEnvelope: [(1244323.815281, 175753.341380), (1299107.043022, 276102.332567)], sr: 2926,
AGSEnvelope: [(-20037507.067162, -20037507.067162), (20037507.067162, 20037507.067162)], sr: 3857
) Here is the version with my style: http://santusmarc.maps.arcgis.com/home/item.html?id=d2f77489c77b480c9b4a284bb640d966
... View more
03-29-2018
02:46 PM
|
0
|
1
|
616
|
POST
|
Yes, I see. But on the website that also uses ArcGIS (though perhaps an old version), they manage to have easily visible labels even at very zoomed resolutions. Is there a way to achieve this with the SDK? 1) If you examine the requests that are made asynchronously, perhaps they are requesting something different from the ArcGIS server than the iOS SDK does? Is there any way to make the ArcGIS iOS SDK match that behavior so I get bigger labels? Seattle Department of Transportation: Seattle Parking Map 2) Another possible solution is using another data set for labels, like this https://developer.here.com/documentation/map-tile/topics/resource-base-lltile.html. To achieve this I will create a map with a Web Mercator Spatial Reference, then add the Seattle WKID 2926 baseman, and then add the tile as a reference layer. Some problems with this arise: A) Obviously there labels are worldwide, while my map data is only for the state of Washington. Is there any way to restrict the drawing of the labels to a specific extent? B) How exactly do I create the levelsOfDetails resolution and scale? All I know is that HERE maps provides 20 levels. I know I can pass in an array of AGSLevelOfDetail, but I am unsure on how to give the proper resolution and scale, so I am just passing in whatever OSM does right now. C) Is it possible to get a vector based label layer from ArcGIS? AGSBasemap imageryWithLabelsVectorBasemap obviously has a AGSArcGISVectorTiledLayer reference layer NSString *template = [NSString stringWithFormat:@"https://{subDomain}.base.maps.cit.api.here.com/maptile/2.1/labeltile/newest/normal.day.mobile/{level}/{col}/{row}/256/png?app_id=%@&app_code=%@&ppi=250&lg=eng", APIKeyHereAppID, APIKeyHereAppCode];
AGSSpatialReference *spatialReference = [AGSSpatialReference webMercator];
AGSPoint *origin = [AGSPoint pointWithX:-20037508.342789
y:20037508.368847
spatialReference:spatialReference];
NSArray *levelsOfDetail = [[((AGSWebTiledLayer *)[[[AGSBasemap openStreetMapBasemap] baseLayers] firstObject]) tileInfo] levelsOfDetail];
AGSTileInfo *tileInfo = [AGSTileInfo tileInfoWithDPI:250
format:AGSTileImageFormatPNG
levelsOfDetail:levelsOfDetail
origin:origin
spatialReference:spatialReference
tileHeight:256
tileWidth:256];
AGSEnvelope *fullExtent = [AGSEnvelope envelopeWithXMin:-20037508.342789
yMin:-20037471.205137
xMax:20037285.703808
yMax:20037471.205137
spatialReference:spatialReference];
AGSLayer *streetLabelsLayer = [[AGSWebTiledLayer alloc] initWithURLTemplate:template
subDomains:@[@"1", @"2", @"3", @"4"]
tileInfo:tileInfo
fullExtent:fullExtent];
streetLabelsLayer.name = NSLocalizedString(@"Street Labels (HERE Maps)", nil);
AGSLayer *baseLayer = [[AGSArcGISMapImageLayer alloc] initWithURL:[NSURL URLWithString:@"https://gisrevprxy.seattle.gov/ArcGIS/rest/services/ext/SP_CityBM_Roads/MapServer/"]];
AGSLayer *linesLayer = [[AGSArcGISMapImageLayer alloc] initWithURL:[NSURL URLWithString:@"https://gisrevprxy.seattle.gov/ArcGIS/rest/services/SDOT_EXT/sdot_parking/MapServer/"]];
AGSBasemap *basemap = [AGSBasemap basemapWithBaseLayers:@[baseLayer]
referenceLayers:@[linesLayer, streetLabelsLayer]];
// Possible bug: You must init your map with a spatial reference, otherwise initing it with the basemap won't display the streetLabelsLayer!
self.mapView.map = [[AGSMap alloc] initWithSpatialReference:[AGSSpatialReference webMercator]];
self.mapView.map.basemap = basemap;
... View more
03-23-2018
03:28 PM
|
0
|
3
|
616
|
POST
|
The problem happens at high zoom levels. Try this polygon AGSPolygon: [[(1254577.712545, 214993.623308), (1254577.712545, 213410.613883), (1253846.642921, 213410.613883), (1253846.642921, 214993.623308)], sr: 2926], sr: 2926 Here is some sample code on how a base street layer is loaded, and then how the labels are loaded: AGSLayer *baseLayer = [[AGSArcGISMapImageLayer alloc] initWithURL:[NSURL URLWithString:@"http:/
gisrevprxy.seattle.gov/ArcGIS/rest/services/ext/SP_CityBM_Roads/MapServer/"]];
AGSMap *map = [[AGSMap alloc] initWithBasemap:[AGSBasemap basemapWithBaseLayer:baseLayer]];
self.mapView.map = map;
AGSArcGISMapImageLayer *tiledLayerLabels = [[AGSArcGISMapImageLayer alloc] initWithURL:[NSURL
URLWithString:@"http://gisrevprxy.seattle.gov/ArcGIS/rest/services/ext/SP_CityBM_Labels/MapServer/"]];
tiledLayerLabels.name = NSLocalizedString(@"Labels", nil);
[self.mapView.map.operationalLayers addObject:tiledLayerLabels]; Then try a similar zoom level on this online site: Seattle Department of Transportation: Seattle Parking Map I am not really tied into using that data source for the labels, as the drawings from that ArcGIS are very low quality (no antialiasing and low resolution). If could get a higher quality (perhaps a vector) data source for labels that could be overplayed in that map, it would work well.
... View more
03-22-2018
07:07 PM
|
0
|
5
|
616
|
POST
|
I have a data source that has 96DPI 512x512 stiles for street labels. These look very tiny on retina displays. In 10.2.5 there was a property called renderNativeResolution for tiled maps, setting it to NO managed to work around this issue. What is the replacement for this in 100.x? Changing scaleSymbols (set to NO by default) after the layer loads does nothing. Layer is hosted here: ext/SP_CityBM_Labels (MapServer) Using AGSArcGISMapImageLayer
... View more
03-21-2018
06:33 PM
|
0
|
7
|
838
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|