POST
|
Thanks rajni sharma - I see what you are trying to do. This works for me: const ringJson = [[["172.4843305878348","-43.48191185124988"],["172.4877698503442","-43.48248171686965"],["172.48715361282302","-43.484065878559875"],["172.48428867831893","-43.48421950013839"],["172.4843305878348","-43.48191185124988"]]] var boundaryJson = {"rings":ringJson, "spatialReference":sr}; var boundary= ArcGISRuntimeEnvironment.createObject("Polygon", {json: boundaryJson}); console.log("boundary", boundary) console.log(JSON.stringify(boundary.json)); var centroid = GeometryEngine.labelPoint(boundary); console.log("=========="); console.log("centroid", centroid); console.log(JSON.stringify(centroid.json)); For reference, when you see "qml point sum hex number" you are printing the address of the Point object. To see the details of the point you need to either print property values or stringify the json: console.log(JSON.stringify(centroid.json));
... View more
08-17-2020
03:18 AM
|
0
|
1
|
2257
|
POST
|
Hi rajni sharma - I think this line is causing the problems because the returned Polygon will be null: var boundary= ArcGISRuntimeEnvironment.createObject("Polygon", {"json": boundaryJson,"id":"property"}); I think this should be: var boundary= ArcGISRuntimeEnvironment.createObject("Polygon", {json: boundaryJson}); (I'm not sure what the "id" : "property" is for here?)
... View more
08-17-2020
02:49 AM
|
0
|
3
|
2257
|
POST
|
We have a number of samples that cover the use of GeometryEngine on github - for example look at this one. For the label point call you should do something like: var centroid = GeometryEngine.labelPoint(ring);
... View more
08-14-2020
04:45 AM
|
0
|
5
|
2257
|
POST
|
I think the whole command should look something like this: const houtline = ArcGISRuntimeEnvironment.createObject("SimpleLineSymbol", {style:Enums.SimpleLineSymbolStyleSolid, color:"red",width:1.0}); const sym = ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol", {style:Enums.SimpleFillSymbolStyleSolid, color:Qt.rgba(2, 2, 0, 0.4), outline:houtline});
... View more
08-14-2020
04:40 AM
|
1
|
1
|
690
|
POST
|
Hi rajni sharma - you can use the GeometryEngine.labelPoint to give you a point that's within the polygon and near the center of gravity.
... View more
08-14-2020
04:18 AM
|
0
|
7
|
2257
|
POST
|
Hi rajni sharma I think the problem is that you have quotes around the properties you are using in the create function (e.g. styls, color, width). Take a look at the example in the API ref here Does this work: return ArcGISRuntimeEnvironment.createObject("SimpleFillSymbol",{style:Enums.SimpleFillSymbolStyleSolid, color:Qt.rgba(2, 2, 0, 0.4),"SimpleLineSymbol":{simpleLineSymbol:houtline}}); I also think you would need to call ArcGISRuntimeEnvironment.createObject for the "houtline" symbol you are creating.
... View more
08-14-2020
04:11 AM
|
1
|
3
|
690
|
POST
|
Hi M Ka - if you never want to sync those layers it may be a good idea to override those capabilities somehow in the web map. For example, you could create a feature layer view on the data to reduce the sync capabilities for those layers. If you do want the layers to be sync enabled in that web map, you can choose the best approach in Runtime: - take all layers offline with sync capabilities (as you are doing now) - manually change the capabilities using the overrides workflow (as you suggest above) If you take the layers offline with the sync capability but then don't want to sync them, you would need to make sure the layer options are set correctly when you come to sync back your changes. By the way, if you are using the OfflineMapTask to take the data offline, you may find the OfflineMapSyncTask useful (it essentially syncs all of the data in your map in one task - e.g. from multiple services). I hope that helps, Luke
... View more
07-27-2020
07:38 AM
|
0
|
0
|
753
|
POST
|
Hi M Ka thanks for your question. When performing this operation you do need to specify the layers in your geodatabase that you wish to sync. Rather than manually creating these SyncLayerOption's yourself you can call GeodatabaseSyncTask.createDefaultSyncGeodatabaseParametersWithSyncDirection passing your offline Geodatabase. When this asynchronous operation completes it will give you a set of parameters with sensible defaults pre-populated - including options for each of the layers. What sync model is your geodatabase using? E.g. is it perLayer or perReplica? Thanks, Luke
... View more
07-27-2020
12:00 AM
|
0
|
2
|
753
|
POST
|
Thanks for testing that out Matt - sorry this is not working well for you. It would also be good to know what kind of data store you are using and what kind of features you are trying to take offline. Would it be possible for you to raise this with Esri support? It sounds like the issues you are seeing are on the feature service end so it would be good to loop them in to what you are seeing. They should also be able to give you specific advice for your installation. Hope that helps, Luke
... View more
07-13-2020
07:53 AM
|
0
|
6
|
1682
|
POST
|
Thanks Mark, Are your features services on AGOL or ArcGIS Enterprise? If your workflow is strictly no editing and you don't even need to sync changes down to the clients you could try setting the SyncModel for the GenerateGeodatabaseParameters QML Type | ArcGIS for Developers to "None" (again using the overrides workflow). This would make your offline map a "snapshot" of the service without the overhead of creating and maintaining a replica and so on.
... View more
07-13-2020
01:49 AM
|
0
|
1
|
1682
|
POST
|
Hi Matt, thanks for the info on your problem - which version of the SDK are you using? Can you share any more details about the particular feature layers that you are using? For example: are they all from the same Feature Service what kind of definition query are you using what options are you using for creating the replica (e.g. sync model, attachments directions, schema only etc.) is this an editing workflow It would also be interesting to test what would happen if you download a single layer without any definition query at all to see how fast that is. Another approach which may be worth looking into (if you haven't already) is the Preplanned Workflow. This would allow you to define the areas for your offline map ahead of time so that users can simply download the required area and associated data. This is a lot quicker for the end user but does require you to know the work areas ahead of time. Thanks, Luke
... View more
07-10-2020
01:04 AM
|
0
|
3
|
1682
|
POST
|
Hi Nathan. There's a couple of ways you can take your topographic basemap offline - but first let me clarify how you want to use the basemap. Basically it comes down to whether you want to: have the basemap loaded as part of a complete offline map, or have the basemap as an independent data-set on your device that you can re-use in different apps For the first approach, you would use the OfflineMapTask to take an entire web map (the Portal Item you mention) offline. That will essentially take all of the layers in the web map (including the basemap) and if they support going offline write them to your device in a directory called a MobileMapPackage. A Runtime app can then later open up that package to display the entire offline map. See this sample for an example of how to do that. Note that a MobileMapPackage can either be a single archived file (e.g. with an .mmpk extension) or a directory containing the offline data. If you use the OfflineMapTask it will be a directory - in either case the API to load and use it is the same. For the second approach you would use the ExportTileCacheTask to take just the basemap offline. You will need to give this task the URL of the basemap layer that you want to take offline. When you take a tiled basemap offline we create a Tile Package (.tpk) on the local device which can then be loaded in a Runtime App using a TileCache instance that you would bind to an ArcGISTileLayer's tileCache property. That tiled layer can then be used in you app as a basemap layer etc. See this sample for an example of how to do that. Note that if you want to take a tiled layer offline it must have the "ExportTiles" capability. For ESRI basemaps (such as the Topographic) tiled basemap there are special "for export" versions of the service that are intended for exporting - e.g. World Topographic Map (for Export). You will need to log in to ArcGIS Online to export these services. Hope that helps, Luke
... View more
06-24-2020
12:37 AM
|
1
|
0
|
432
|
POST
|
Just to follow on from Joe's comments, > I believe these are basically the same files contained in an MMPK package, just not packaged. That's correct. When you take a map offline via the Runtime it creates the same structure as a MobileMapPackage created from Pro just not archived (to allow editing of data). In both cases you can access the data using the MobileMapPackage API in Runtime bu supplying the path to the .mmpk file or to the directory. > the number of pre-packaged maps is very limited (I believe 16 per web map) Also correct. You can create new copies of the webmap if you require more areas. If you want to go the route of taking individual layers offline, the relevant Runtime API is the GenerateGeodatabaseSyncTask. We definitely recommend using the Runtime APIs to take maps/layers offline. Whilst you could do this directly via the REST API you would need to handle authentication, edit validation, error handling etc. yourself. Using the Runtime API takes care of these things for you and also gives access to the other parts of the API for visualizing and analysing your data etc.
... View more
11-13-2019
01:48 AM
|
0
|
1
|
1958
|
POST
|
Hi Sean - did you manage to resolve this issue? We've seen a similar sounding issue in another post (https://community.esri.com/message/886838-offline-map-does-not-include-tables ) that turned out to be because of a duplicate "Creator" field in the table. Luke
... View more
10-25-2019
01:15 AM
|
0
|
1
|
957
|
POST
|
Hi Sean - thanks for looking into it. Are the tables part of the same feature service as other layers which do work correctly?
... View more
09-18-2019
01:35 AM
|
0
|
3
|
957
|
Title | Kudos | Posted |
---|---|---|
1 | 05-04-2018 04:22 AM | |
1 | 11-02-2022 06:25 AM | |
1 | 07-12-2022 05:35 AM | |
4 | 10-21-2021 01:58 AM | |
1 | 07-12-2021 01:09 AM |
Online Status |
Offline
|
Date Last Visited |
03-25-2024
03:44 PM
|