|
POST
|
I guess that didn't happen because the release notes still list it as a known issue. BUG-000115165 Poor WebTiledLayer performance when deriving the class from a custom ServiceImageTiledLayer.
... View more
10-17-2018
02:10 PM
|
0
|
0
|
1800
|
|
POST
|
I did check and we do have calls to pause and dispose the mapview at the right time.
... View more
10-17-2018
10:40 AM
|
0
|
0
|
1467
|
|
POST
|
I've done everything you have asked and this is still the result. In the code, i can debug and see that one MobileBaseMapLayer is added to the basemap and four feature layers are added to the operational layers. But none of that helps because I see absolutely nothing on screen. Not even a grid. No basemap, no feature layers. Nothing. This is with your very own Yellowstone.mmpk example. Here is the code. /* Copyright 2016 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.esri.arcgisruntime.sample.openmobilemappackage;
import java.io.File;
import java.util.List;
import java.util.concurrent.ExecutionException;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.Toast;
import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
import com.esri.arcgisruntime.concurrent.ListenableFuture;
import com.esri.arcgisruntime.geometry.Point;
import com.esri.arcgisruntime.geometry.SpatialReference;
import com.esri.arcgisruntime.geometry.SpatialReferences;
import com.esri.arcgisruntime.layers.ArcGISTiledLayer;
import com.esri.arcgisruntime.layers.ArcGISVectorTiledLayer;
import com.esri.arcgisruntime.layers.FeatureLayer;
import com.esri.arcgisruntime.layers.ImageTiledLayer;
import com.esri.arcgisruntime.layers.Layer;
import com.esri.arcgisruntime.layers.LegendInfo;
import com.esri.arcgisruntime.layers.MobileBasemapLayer;
import com.esri.arcgisruntime.layers.WebTiledLayer;
import com.esri.arcgisruntime.loadable.LoadStatus;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.MobileMapPackage;
import com.esri.arcgisruntime.mapping.Viewpoint;
import com.esri.arcgisruntime.mapping.view.MapView;
public class MainActivity extends AppCompatActivity {
private static final String TAG = MainActivity.class.getSimpleName();
private static final String FILE_EXTENSION = ".mmpk";
private static File extStorDir;
private static String extSDCardDirName;
private static String filename;
private static String mmpkFilePath;
// define permission to request
String[] reqPermission = new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE };
private MapView mMapView;
private MobileMapPackage mapPackage;
private int requestCode = 2718;
private ArcGISMap mMap;
/**
* Create the mobile map package file location and name structure
*/
private static String createMobileMapPackageFilePath() {
return extStorDir.getAbsolutePath() + File.separator + "agis" + File.separator + filename
+ FILE_EXTENSION;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ArcGISRuntimeEnvironment.setLicense("runtimelite,1000,rud8488948081,none,TRB3LNBHPD0H4P7EJ008");
// get sdcard resource name
extStorDir = Environment.getExternalStorageDirectory();
// get the directory
extSDCardDirName = this.getResources().getString(R.string.config_data_sdcard_offline_dir);
// get mobile map package filename
filename = "Yellowstone";//this.getResources().getString(R.string.config_mmpk_name);
// create the full path to the mobile map package file
mmpkFilePath = createMobileMapPackageFilePath();
// retrieve the MapView from layout
mMapView = (MapView) findViewById(R.id.mapView);
mMap = new ArcGISMap(Basemap.Type.TOPOGRAPHIC_VECTOR,44.417,-112.08,11);
mMapView.setMap(mMap);
// For API level 23+ request permission at runtime
if (ContextCompat.checkSelfPermission(MainActivity.this, reqPermission[0]) == PackageManager.PERMISSION_GRANTED) {
loadMobileMapPackage(mmpkFilePath);
} else {
// request permission
ActivityCompat.requestPermissions(MainActivity.this, reqPermission, requestCode);
}
}
/**
* Handle the permissions request response
*/
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
loadMobileMapPackage(mmpkFilePath);
} else {
// report to user that permission was denied
Toast.makeText(MainActivity.this, getResources().getString(R.string.location_permission_denied),
Toast.LENGTH_SHORT).show();
}
}
/**
* Load a mobile map package into a MapView
*
* @param mmpkFile Full path to mmpk file
*/
private void loadMobileMapPackage(String mmpkFile) {
//[DocRef: Name=Open Mobile Map Package-android, Category=Work with maps, Topic=Create an offline map]
// create the mobile map package
File mfile = new File(mmpkFile);
boolean exists = mfile.exists();
Log.i(TAG,"File " + mmpkFile + " exists=" + exists);
mapPackage = new MobileMapPackage(mmpkFile);
// load the mobile map package asynchronously
mapPackage.loadAsync();
// add done listener which will invoke when mobile map package has loaded
mapPackage.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
// check load status and that the mobile map package has maps
if (mapPackage.getLoadStatus() == LoadStatus.LOADED && mapPackage.getMaps().size() > 0) {
// add the map from the mobile map package to the MapView
ArcGISMap amap = mapPackage.getMaps().get(0);
//mMap.setBasemap(Basemap.createNavigationVector());
//ArcGISMap defaultMap = new ArcGISMap(Basemap.Type.TOPOGRAPHIC_VECTOR,44.417,-112.08,11);
// Basemap basemap = Basemap.createNavigationVector();
//mMap.setBasemap(basemap);
//mMap.getBasemap().getBaseLayers().add(new ArcGISTiledLayer("https://www.arcgis.com/home/item.html?id=30e5fe3149c34df1ba922e6f5bbf808f"));
///mMapView.setMap(defaultMap);
for(int i=0;i<amap.getBasemap().getBaseLayers().size(); i++)
{
Layer l = amap.getBasemap().getBaseLayers().get(i);
Layer layerCopy = copyLayer(l);
if(layerCopy!=null)
mMap.getBasemap().getBaseLayers().add(layerCopy);
}
for(int j=0;j<amap.getOperationalLayers().size(); j++)
{
Layer o = amap.getOperationalLayers().get(j);
Layer layerCopy = copyLayer(o);
if(layerCopy!=null)
mMap.getOperationalLayers().add(layerCopy);
}
//Log.i(TAG,"Mobile Map SR: " + mMap.getSpatialReference().getWKText());
//ArcGISTiledLayer tiledLayerBaseMap = new ArcGISTiledLayer("http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer");
//mMap.getBasemap().getBaseLayers().add(tiledLayerBaseMap);
// Log.i(TAG,"Mobile Map SR: " + tiledLayerBaseMap.getSpatialReference().getWKText());
// mMapView.setMap(mMap);
/*
for (final Layer layer:mMap.getOperationalLayers() ) {
SpatialReference sr =layer.getSpatialReference();
if(sr== null)
Log.i(TAG,"Layer "+ layer.getName() + " : SR==null" );
else
Log.i(TAG,"Layer "+ layer.getName() + " : " + sr.getWKText() );
final ListenableFuture<List<LegendInfo>> future = layer.fetchLegendInfosAsync();
future.addDoneListener(new Runnable() {
@Override
public void run() {
Log.i(TAG,"Layer "+ layer.getName() + " : "+ future.isDone());
if(future.isDone())
{
try {
List<LegendInfo> legendInfos = future.get();
for(LegendInfo linfo:legendInfos)
{
Log.i(TAG,"info: " + linfo.getName() + " : " + linfo.getSymbol().toJson() );
}
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
}
});
}
*/
Log.i("mpackage","mMapView" + mMapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE).toJson());
//45.872546, -121.976170 Wind River Road
//-110.3626,46.8797
mMapView.setViewpointCenterAsync(new Point(-121.44,45.115, SpatialReferences.getWgs84()),144000);
Log.i("mpackage","mMapView" + mMapView.getCurrentViewpoint(Viewpoint.Type.CENTER_AND_SCALE).toJson());
} else {
// Log an issue if the mobile map package fails to load
Log.e(TAG, mapPackage.getLoadError().getMessage());
}
}
});
//[DocRef: END]
}
Layer copyLayer(Layer l)
{
if(l instanceof FeatureLayer)
{
return ((FeatureLayer) l).copy();
}
if(l instanceof ImageTiledLayer)
{
return((WebTiledLayer)l).copy();
}
if(l instanceof ArcGISTiledLayer)
{
return ((ArcGISTiledLayer)l).copy();
}
if(l instanceof ArcGISVectorTiledLayer)
{
return ((ArcGISVectorTiledLayer)l).copy();
}
if(l instanceof MobileBasemapLayer)
{
return ((MobileBasemapLayer)l).copy();
}
return null;
}
@Override
protected void onPause() {
super.onPause();
mMapView.pause();
}
@Override
protected void onResume() {
super.onResume();
mMapView.resume();
}
@Override
protected void onDestroy() {
super.onDestroy();
mMapView.dispose();
}
}
... View more
10-16-2018
09:32 AM
|
0
|
4
|
3066
|
|
POST
|
No luck. Tried: "\"where\": \"TypeOf($feature)=='Polyline'\"}," +
Tried:
"\"where\": \"TypeOf($feature)==Polyline\"}," + Sorry to be dense, but to do this, I will need an exact example.
... View more
10-15-2018
02:41 PM
|
0
|
1
|
1312
|
|
POST
|
So then what would be the complete syntax? Any example? "\"where\": \"TypeOf($feature.geometry)='Polyline'\"}," +
... View more
10-13-2018
03:25 PM
|
0
|
2
|
1312
|
|
POST
|
Where is the 'copy' method? I don't see that method on the layer class.
... View more
10-12-2018
04:49 PM
|
0
|
6
|
3066
|
|
POST
|
I was trying out some label definitions in Android on a GraphicsOverlay
static final String labelPolygon = "{" +
"\"labelExpressionInfo\": {" + // Define a labeling expression that will show the address attribute value
"\"expression\": \"return $feature.geometryName;\"}," +
"\"labelPlacement\": \"esriServerPolygonPlacementAlwaysHorizontal\"," + // Align labels horizontally
"\"where\": \"$feature.geometryType='Polygon'\"}," +
"\"symbol\": {" + // Use a black bold text symbol
"\"color\": [0,0,0,255]," +
"\"haloColor\": [255,255,255,96]," +
"\"haloSize\": 2," +
"\"font\": {\"size\": 10}," +
"\"type\": \"esriTS\"}" +
"}";
static final String labelPolyline = "{" +
"\"labelExpressionInfo\": {" + // Define a labeling expression that will show the address attribute value
"\"expression\": \"return $feature.geometryName;\"}," +
"\"where\": \"$feature.geometryType='Polyline'\"}," +
"\"labelPlacement\": \"esriServerLinePlacementAboveAlong\"," + // Align labels horizontally
"\"symbol\": {" + // Use a black bold text symbol
"\"color\": [0,0,0,255]," +
"\"haloColor\": [255,255,255,96]," +
"\"haloSize\": 2," +
"\"font\": {\"size\": 10}," +
"\"type\": \"esriTS\"}" +
"}";
static final String labelPoint = "{" +
"\"labelExpressionInfo\": {" + // Define a labeling expression that will show the address attribute value
"\"expression\": \"return $feature.geometryName;\"}," +
"\"where\": \"$feature.geometryType='Point'\"}," +
"\"labelPlacement\": \"esriServerPointLabelPlacementBelowCenter\"," + // Align labels horizontally
"\"symbol\": {" + // Use a black bold text symbol
"\"color\": [0,0,0,255]," +
"\"haloColor\": [255,255,255,96]," +
"\"haloSize\": 2," +
"\"font\": {\"size\": 10}," +
"\"type\": \"esriTS\"}" +
"}";
I thought perhaps that since they have a rule for polygon, polyline, and point, that they would
That wasn't the case, and I got too many labels. I get one below and above a point symbol.
I tried adding "where" clause to restrict the polygon labels to polygons and so forth.
Then all labels dissappear.
I have found little to no guidance on what syntax should be followed in a where clause. I don't even know if it is SQL
or an Arcade Expression.
... View more
10-12-2018
03:50 PM
|
0
|
4
|
1562
|
|
POST
|
I've been looking for an answer to this. Suppose I load a Mobile Map Package. It has layers in it. If I do either of these things: Open the ArcgisMap and add more layers to it Take the layers and add them to a different ArcGISMap The result is that I have an invalid map that shows nothing. Is it still all or nothing for Mobile Map Packages? This way, I can't distribute them as .mmpk - I have to extract the individual .geodatabases and use them that way.
... View more
10-10-2018
04:38 PM
|
0
|
10
|
3768
|
|
POST
|
It occurs in Android 6-9 I do not have simple code to reproduce it. It does not happen all the time, but happens fairly often for actual users. If I knew what triggers it, I'd be closer to fixing it. This code is in onCreate() of the activity. mMapView.addMapScaleChangedListener(new MapScaleChangedListener() {
@Override
public void mapScaleChanged(MapScaleChangedEvent mapScaleChangedEvent) {
updateZoomLevelText();
}
});
This code is in a local method. Only important thing here is that we are calling getMapScale.
private void updateZoomLevelText() {
tvZoomLevel.setText(String.valueOf(BC_Helper.getZoomLevelByScale(mMapView.getMapScale())));
} Only thing that occurs to me is that somehow we are getting this event at a point in the Activity lifecycle where the activity, and therefore the MapView, is no longer valid.
... View more
09-25-2018
12:17 PM
|
0
|
2
|
1467
|
|
POST
|
We get some crash reports sometimes that we don't quite understand. I understand that there are times when the MapView is not ready to return information like Scale and VisibleArea. But how do I tell when it is safe? Crashing isn't very user friendly. Example 1: com.esri.arcgisruntime.internal.jni.CoreMapView.nativeGetScale (SourceFile) com.esri.arcgisruntime.internal.jni.CoreMapView.q (SourceFile:233) com.esri.arcgisruntime.internal.h.b.o.m (SourceFile:224) com.esri.arcgisruntime.mapping.view.MapView.getMapScale (SourceFile:295) ....HomeActivity.updateZoomLevelText (BCHomeActivity.java:687) ...HomeActivity.access$000 (BCHomeActivity.java:203) ...HomeActivity$1.mapScaleChanged (BCHomeActivity.java:366) com.esri.arcgisruntime.internal.h.b.n$1.run (SourceFile:58) Sure there are times when the scale can't be read. But I don't think one of those times should be when you just called us to tell us the scale changed. That seems like a time when we can get a scale and update the zoomlevel. But nope, it crashes. Not all the time, but some of the time. A bit ridiculous? Is there some method available like boolean MapView isItSafetoAskforScale() ? Because the only other alternative I can think of is to handle an exception every time we call MapView.getMapScale(). Or just let it crash.
... View more
09-21-2018
06:55 PM
|
0
|
5
|
1756
|
|
POST
|
Thanks. I'd hate to have to resort to proxies or something to work around the Url pattern limitations of WebTiledLayer and the performance limitations of the ServiceImageTiledLayer.
... View more
06-27-2018
10:01 AM
|
0
|
2
|
1800
|
|
POST
|
As a slight correction. WebTiledlayer does not allow you to overrride getTileUrl and expect it to be called. We are using a subclass of ServiceImageTiledLayer. I have produced a simple example using your WebTiledLayer sample. The If you change this line of code to use WebTiledLayer instead of my custom class, performance is just fine. Using my custom class inherited from ServiceImageTiledLayer - well, I am still waiting for the map to refresh after 10 minutes. In addition, the runtime thread pool of ArcGIS gets all used up, so features like place search suggestion don't work. final MyWebTiledLayer webTiledLayer= new MyWebTiledLayer(templateUri);
I have escalated the case with Esri support, but they are unlikely to find a solution without help from developers. While this template could be used with either WebTiledLayer or a custom class, there are many that cannot. We use up to 60 template urls in our application. Web Tiled Layer can only handle {row} {col} {level} as tags. Notably it cannot handle TMS server, just because the y is upside down from your {row} tag. It cannot handle quadkeys like in Bing Urls. I am aware there is a Bing Maps layer, but it only has three styles. It could not handle, for instance, the Ordnance Survey style for the UK. It can't handle a bounding box query to create tiles from a WMS server that supports 900913 projection. /* Copyright 2017 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.esri.arcgisruntime.sample.webtiledlayer;
import java.util.Arrays;
import java.util.List;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.esri.arcgisruntime.arcgisservices.TileInfo;
import com.esri.arcgisruntime.layers.WebTiledLayer;
import com.esri.arcgisruntime.loadable.LoadStatus;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.Viewpoint;
import com.esri.arcgisruntime.mapping.view.MapView;
public class MainActivity extends AppCompatActivity {
private MapView mMapView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// access MapView from layout
mMapView = (MapView) findViewById(R.id.mapView);
// list of subdomains
List<String> subDomains = Arrays.asList("a", "b", "c", "d");
// url pattern
String templateUri = "http://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Topographic/ImageServer/tile/{level}/{row}/{col}/";
// webtile layer
final MyWebTiledLayer webTiledLayer= new MyWebTiledLayer(templateUri);
webTiledLayer.loadAsync();
webTiledLayer.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
if (webTiledLayer.getLoadStatus() == LoadStatus.LOADED) {
// use webtile layer as Basemap
ArcGISMap map = new ArcGISMap(new Basemap(webTiledLayer));
map.setInitialViewpoint(new Viewpoint(-42.106967,147.097578,577791));
mMapView.setMap(map);
TileInfo tinfo = webTiledLayer.getTileInfo();
Log.i("webtiledlayer","web tileinfo: " + tinfo);
// custom attributes
/*
webTiledLayer.setAttribution("Map tiles by <a href=\"http://stamen.com/\">Stamen Design</a>, " +
"under <a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>. " +
"Data by <a href=\"http://openstreetmap.org/\">OpenStreetMap</a>, " +
"under <a href=\"http://creativecommons.org/licenses/by-sa/3.0\">CC BY SA</a>.");
*/
}
}
});
}
@Override
protected void onPause() {
super.onPause();
// pause MapView
mMapView.pause();
}
@Override
protected void onResume() {
super.onResume();
// resume MapView
mMapView.resume();
}
@Override
protected void onDestroy() {
super.onDestroy();
// dispose MapView
mMapView.dispose();
}
} package com.esri.arcgisruntime.sample.webtiledlayer;
import android.util.Log;
import com.esri.arcgisruntime.arcgisservices.LevelOfDetail;
import com.esri.arcgisruntime.arcgisservices.TileInfo;
import com.esri.arcgisruntime.data.TileKey;
import com.esri.arcgisruntime.geometry.Envelope;
import com.esri.arcgisruntime.geometry.Point;
import com.esri.arcgisruntime.geometry.SpatialReferences;
import com.esri.arcgisruntime.layers.ServiceImageTiledLayer;
import com.esri.arcgisruntime.layers.WebTiledLayer;
import java.util.ArrayList;
/**
* Created by valuedcustomer2 on 6/15/18.
*/
public class MyWebTiledLayer extends ServiceImageTiledLayer {
private static final String TAG = MyWebTiledLayer.class.getSimpleName();
String baseurl="default";
public MyWebTiledLayer(String templateUri) {
super(CreateTileInfo(1,15,templateUri), new Envelope(-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244, SpatialReferences.getWebMercator()));
baseurl = templateUri;
TileInfo ours = getTileInfo();
Log.i(TAG,"ours: " + ours.getCompressionQuality() + ", " + ours.getDpi() + ", " + ours.getFormat()+ ", "
+ ours.getLevelsOfDetail() + ", " + ours.getOrigin() + ", " + ours.getSpatialReference() + ", " + ours.getTileHeight() + ", " + ours.getTileWidth()) ;
Log.i(TAG, "end of constructor");
}
@Override
public String getUri() {
return baseurl;
}
private static final int TILESIZE = 256;
private static final double INITIALRESOLUTION = 2 * Math.PI * 6378137 / TILESIZE;
static public double zresolution(int zoom) {
return INITIALRESOLUTION / Math.pow(2, zoom);
}
private static TileInfo CreateTileInfo(int minZoom, int maxZoom, String baseurl)
{
WebTiledLayer wlayer = new WebTiledLayer(baseurl);
TileInfo theirs =wlayer.getTileInfo();
Log.i(TAG, "their extent: " + wlayer.getFullExtent());
Log.i(TAG,"theirs: " + theirs.getCompressionQuality() + ", " + theirs.getDpi() + ", " + theirs.getFormat()+ ", "
+ theirs.getLevelsOfDetail() + ", " + theirs.getOrigin() + ", " + theirs.getSpatialReference() + ", " + theirs.getTileHeight() + ", " + theirs.getTileWidth()) ;
int dpi = 96;
ArrayList<LevelOfDetail> levels = new ArrayList<>();
for (int i = minZoom; i <= maxZoom; i++)
{
double resolution = zresolution(i);
double scale = resolution * dpi * 39.37;
LevelOfDetail l = new LevelOfDetail(i, resolution, scale);
levels.add(l);
LevelOfDetail t = theirs.getLevelsOfDetail().get(i);
Log.i(TAG," our LOD("+ i +"," + resolution + "," + scale + ")");
Log.i(TAG,"their LOD("+ t.getLevel() +"," + t.getResolution() + "," + t.getScale() + ")");
}
return theirs;
//return new TileInfo(dpi, TileInfo.ImageFormat.PNG, levels, new Point(-20037508.342789244, 20037508.342789244, SpatialReferences.getWebMercator()), SpatialReferences.getWebMercator(), 256, 256);
}
@Override
protected String getTileUrl(TileKey tileKey) {
String tileurl = baseurl.replace("{level}",String.valueOf(tileKey.getLevel())).replace("{col}",String.valueOf(tileKey.getColumn())).replace("{row}",String.valueOf(tileKey.getRow()));
Log.d(TAG,"Url = " +tileurl);
return tileurl;
}
@Override
public String getId() {
return super.getId();
}
@Override
public void setId(String id) {
super.setId(id);
}
}
... View more
06-26-2018
10:33 AM
|
0
|
0
|
1800
|
|
POST
|
Yes, this is 100.2.1. I have a case in support with this information.
... View more
06-15-2018
10:27 AM
|
0
|
0
|
1800
|
|
POST
|
Why is WebTiledLayer being super slow on purpose? Both I and a colleague see this problem. Using WebTiledLayer with some custom urls. For control group, we used World Topographic Map. Yes, I know this could be done with a different class also, but just for comparison. We also used other servers from Canada, Australia and Tasmania. We tried this simple test: Zoom in by several steps quickly from zoom 7 to 15 World Topographic Map worked very fast. You can see the difference fairly soon. We notice via the logs that World Topographic Maps is download all levels between 7 and 15, but it does so quickly. 06-12 08:22:04.605 511-1749/.... key: 11,344,727 url: https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/11/727/344/ 06-12 08:22:04.605 511-1768/... key: 11,344,730 url: https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/11/730/344/ 06-12 08:22:04.606 511-1800/...: key: 11,343,731 url: https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/11/731/343/ You notice there is only milliseconds or less between requests. We tried with another server template from Toporama WMS in Canada. (Yes, I know that there are WMS classes too, but I am making a comparison). You are waiting for five or ten minutes for the screen to refresh. It is still downloading all the levels - but taking its time. 06-12 08:50:31.190 511-29904/... key: 9,106,160 url: http://maps.geogratis.gc.ca/wms/toporama_en?version=1.1.1&request=GetMap&format=image/png&bgcolor=0xFFFFFF&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:900913&layers=vegetation,builtup_areas,designated_areas,hydrography,hypsography,water_saturated_soils,landforms,constructions,road_network,railway,aeronautical_network,structures,power_network,boundaries,feature_names&bbox=-11740728,7435794,-11662456,7514066&width=256&height=256 06-12 08:50:32.180 511-29907/... key: 9,105,158 url: http://maps.geogratis.gc.ca/wms/toporama_en?version=1.1.1&request=GetMap&format=image/png&bgcolor=0xFFFFFF&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:900913&layers=vegetation,builtup_areas,designated_areas,hydrography,hypsography,water_saturated_soils,landforms,constructions,road_network,railway,aeronautical_network,structures,power_network,boundaries,feature_names&bbox=-11818999,7592337,-11740728,7670609&width=256&height=256 06-12 08:50:33.145 511-29909/... key: 9,106,157 url: http://maps.geogratis.gc.ca/wms/toporama_en?version=1.1.1&request=GetMap&format=image/png&bgcolor=0xFFFFFF&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:900913&layers=vegetation,builtup_areas,designated_areas,hydrography,hypsography,water_saturated_soils,landforms,constructions,road_network,railway,aeronautical_network,structures,power_network,boundaries,feature_names&bbox=-11740728,7670609,-11662456,7748880&width=256&height=256 06-12 08:50:35.675 511-29910/... key: 9,107,157 url: http://maps.geogratis.gc.ca/wms/toporama_en?version=1.1.1&request=GetMap&format=image/png&bgcolor=0xFFFFFF&exceptions=application/vnd.ogc.se_inimage&srs=EPSG:900913&layers=vegetation,builtup_areas,designated_areas,hydrography,hypsography,water_saturated_soils,landforms,constructions,road_network,railway,aeronautical_network,structures,power_network,boundaries,feature_names&bbox=-11662456,7670609,-11584185,7748880&width=256&height=256 As you see, it waits between one and five seconds before it even makes a request. Can we blame the server? No, because the SDK isn't trying too hard. A colleague in Canada has the same performance. Somehow, our colleague in Vietnam did not see this problem, even though he is much farther from the server. I tried it with many other servers that were pretiled, including some obviously using MapServer or ImageServer: http://services.thelist.tas.gov.au/arcgis/rest/services/Basemaps/Topographic/ImageServer/tile/{l}/{y}/{x}/ It appears you have some code like this: foreach(tile in tilesNeeded) { //we want to make sure anyone not using ArcGISOnline looks bad. if( not from ArcGISOnline) { //impose a meaningless delay. wait one to five seconds; } RequestTile(tile); } What the heck is going on?
... View more
06-12-2018
09:39 AM
|
0
|
7
|
2300
|
|
POST
|
So I do need to give competitors apps full access to my hard earned resources. Although I guess I could create terms of use that they owe me $1000 per month for unauthorized use. OR I need to get all my users an ArcGISOnline account. Could that be done in an automated fashion. If it requires Named User account, I don't think that is practical. This is a consumer, not enterprise app. OR I would need to setup my own ArcGIS Server in the cloud. Am I right?
... View more
06-12-2018
07:45 AM
|
0
|
1
|
5077
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-29-2017 03:07 PM | |
| 1 | 04-14-2020 10:41 PM | |
| 1 | 11-21-2017 08:58 PM | |
| 2 | 06-01-2018 12:39 PM | |
| 3 | 05-30-2018 02:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
01-22-2021
10:16 PM
|