POST
|
Your starting point is right, the problem comes from the Spatial Reference. After replace the former SR with WGS_1984_Web_Mercator_Auxiliary_Sphere, feature layer can now properly display. Thanks for your time Robert!
... View more
12-10-2016
08:00 AM
|
0
|
0
|
547
|
POST
|
All right, after several days of struggle, I finally make symbols show by switching my Spatial Reference System from Beijing_1954_GK_Zone_20N(WKID: 21480) to WGS_1984_Web_Mercator_Auxiliary_Sphere(WKID: 3857). My map is a subway 3D-laser scanning image using an assumed coordinate system, it does not matter whatever the actual SR is. But, curiously, I'm wondering what if I'm really have to use that projection system, how to solve that question I raised above.
... View more
12-10-2016
07:50 AM
|
0
|
1
|
1981
|
POST
|
Oh, maybe I know what is wrong, I just provide a wrong WKID, it should be 21420.How stupid.
... View more
12-08-2016
11:02 AM
|
0
|
4
|
1435
|
POST
|
Sorry I didn't mention the js version, I thought the 4.1 tag may explain itself. WKID 102100 is a Chinese Local Projection, does it matters? Projection: Gauss_Kruger False_Easting: 20500000.0 False_Northing: 0.0 Central_Meridian: 117.0 Scale_Factor: 1.0 Latitude_Of_Origin: 0.0 Linear Unit: Meter (1.0) -------------------------------------- Geographic Coordinate System: GCS_Beijing_1954 Angular Unit: Degree (0.0174532925199433) Prime Meridian: Greenwich (0.0) Datum: D_Beijing_1954 Spheroid: Krasovsky_1940 Semimajor Axis: 6378245.0 Semiminor Axis: 6356863.018773047 Inverse Flattening: 298.3
... View more
12-08-2016
10:48 AM
|
0
|
5
|
1435
|
POST
|
/** tile map server url */
var tileUrl = "http://localhost:6080/arcgis/rest/services/奥体东到元通上行/MapServer";
var tileLayer = new TileLayer({
url: tileUrl
});
/** feature server url */
var featureBaseUrl = "http://localhost:6080/arcgis/rest/services/元通到奥体东上行要素/FeatureServer";
/** predefined layer id array list*/
var featureArray = ['0', '1', '2'];
/** store feature layer in this list */
var featureLayerList = [];
/** create a basemap */
var baseMap = new Basemap({
baseLayers: [tileLayer],
title: "Metro Scan Basemap",
id: "scanBaseMap"
});
/** initial a map, set the TileLayer as its basemap*/
var map = new Map({
basemap: baseMap //comment or uncomment this line not solve my issue
});
/** create map view */
var view = new MapView({
container: "viewDiv",
map: map,
extent: {
xmin: -9177811,
ymin: 4247000,
xmax: -9176791,
ymax: 4247784,
spatialReference: 102100
}
});
var popupTemplate = {
title: "<h5 style='font-family:Microsoft Yahei Light;'>{Type}</h5>",
content: "<table style='font-family:Microsoft Yahei Light;'><tbody>" +
// "<tr><td>类型:</td><td> " + layerName + "</td></tr>" +
"<tr><td>环号:</td><td> {Ring}</td></tr>" +
"<tr><td>里程:</td><td> {Mile}</td></tr>" +
"</tbody></table>"
};
view.then(function () {
/** add feature layer to map */
featureArray.forEach(function (layerName) {
var url = featureBaseUrl + '/' + layerName;
var layer = new FeatureLayer({
url: url,
outFields: ["*"],
popupTemplate: popupTemplate
});
map.add(layer);
featureLayerList.push(layer);
});
}); Now it's better
... View more
12-08-2016
10:08 AM
|
0
|
7
|
1435
|
POST
|
My code is quite simple, just initialize the map and add layer to it by given some local server URL. Layers' spatial reference are consistent, otherwise the popup won't show up at the right place when click on the feature.There is one thing I don't figure out, you said I should provide a SimpleFillSymbol, while I'm trying to use a Server Side Defined Symbol, is it necessary to write my own js code to implement this? Inadvertently, I found some feature however can appear when panning the map left or right and disappear immediately if I pan again. Notice the rest of them marked as red lines are still invisible.
... View more
12-08-2016
09:29 AM
|
0
|
9
|
1435
|
POST
|
No, I don't think so. After removing the base map layer, feature layer symbol still won't show.
... View more
12-08-2016
08:20 AM
|
0
|
0
|
547
|
POST
|
When loading a Feature Service from my localhost, I came to this strange thing: All my feature layers are loaded without any error, but they can not be seen on the map. In ArcGIS, it should be like this: In Browser, it shows nothing. However, click on feature do does a query and returns the right data. Changing Layer's Display Order does not fix it. Do I have to write a client js Render myself, or am I missing something. Can anyone give some help.
... View more
12-07-2016
04:53 PM
|
0
|
15
|
4010
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|