POST
|
Has anyone seen an issue where relates established in APRX files are stripped from map services published from those documents? We have an APRX file with two layers and four sand alone tables, and each of the two layers has a relationship set for each of the four tables. They show up fine in the APRX, and worked in prior versions of server, but we recently upgraded to 11.1 and the existing service has had all of its relates removed. I've rebuilt the APRX and republished to the same effect. Any ideas would be appreciated! Brian
... View more
02-08-2024
06:00 PM
|
0
|
0
|
187
|
POST
|
Hello, I'm trying to use vue components to create custom dom elements that will be used as widgets to manipulate the mapview in an ESRI js app. I want to be able to write "widgetX.vue" components and import them into the vue that holds my webmap/mapview, then emit commands from those child vue components and have the webmap/mapview in the esri map vue component use those commands. Here's an example of what I mean. I'm imagining a widget that will toggle the basemap between "satellite" and "streets" by emitting one of those two strings from the "BasemapWidget.vue" component and then having the map and view in the "EsriMap.vue" component react to changes that are applied by binding the emitted message to a method in the "EsriMap.vue" template. This value change works in the app currently, but (I think due to the fact that the esri map is initialized in the mounted method) the map seems unable to "hear" these changing values. In this example, I have added an expand whose content should update to the value that is received from the emit in the basemap widget vue. What I expect to see here is that when the basemap widget component (imported from "./BasemapWidget.vue") is clicked, the value contained in the expand will update to the value emitted from that component. I know the issue isn't in communication between the two components, because I'm able to console.log that value when the "changeBasemap" method is available from OUTSIDE of mounted. Does my pattern make any sense? Please help me ReneRubalcava. You might be my only hope! EsriMap.Vue, the parent component that will hold the basemap widget component: <template>
<button @click="updateExpandValue"/>
<BasemapWidget @basemapChanged="updateExpandValue"/>
<div id="map_view"></div>
</template>
<script lang="ts">
import { defineComponent,ref, onMounted, Component} from "vue";
import WebMap from "@arcgis/core/WebMap";
import MapView from "@arcgis/core/views/MapView";
import Bookmarks from "@arcgis/core/widgets/Bookmarks";
import Expand from "@arcgis/core/widgets/Expand";
import WsdotBasemap from "@/layers/WsdotBasemap";
import TrafficLayer from "@/layers/TrafficLayer";
import ParkRideLayer from "@/layers/ParkRideLayer";
import basemapWidget from "./BasemapWidget.vue"
import BasemapWidget from "./BasemapWidget.vue";
export default defineComponent({
components: {BasemapWidget},
/*data(){
return{
expandValue:""
}
},*/
setup(){
const expandValue = ref<string>("")
const updateExpandValue=(value:string)=>{
expandValue.value=value
console.log(`expandValue updated to ${expandValue.value}`)
}
return{expandValue, updateExpandValue}
},
async mounted(){
const webmap = new WebMap({
//basemap: WsdotBasemap,
basemap: "streets",
layers: [TrafficLayer, ParkRideLayer],
});
const mapView = new MapView({
container: "map_view", // https://v3.vuejs.org/api/instance-properties.html
map: webmap,
extent: {
ymax: 6316025.98739708,
xmin: -13911155.7073957,
xmax: -12984203.1967109,
ymin: 5704865.77272526,
spatialReference: { wkid: 102100 },
},
});
const bookmarks = new Bookmarks({
view: mapView,
editingEnabled: true,
});
const bookmarkExpand = new Expand({
view: mapView,
content: bookmarks,
expanded: false,
});
let contentDiv= document.createElement("div")
contentDiv.innerHTML=this.expandValue
const testExpand = new Expand({
view: mapView,
content: contentDiv,
expanded: true,
})
mapView.ui.add(bookmarkExpand, "top-right");
mapView.ui.add(testExpand, "top-right");
}
})
</script>
<style scoped>
@import "https://js.arcgis.com/4.19/@arcgis/core/assets/esri/themes/light/main.css";
div#map_view {
padding: 0;
margin: 0;
height: 70%;
width: 100%;
}
</style> BasemapWidget.vue, the custom component that, when clicked, emits the value that I want to have the map pick up: <template>
<div class="basemapWidget" @click="changeBasemap">
{{selectedBasemap}}
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
import WebMap from "@arcgis/core/WebMap";
export default defineComponent({
name:'BasemapWidget',
emits:['basemapChanged'],
props:{
webMap: WebMap
},
setup(props,{emit}){
console.log(props.webMap)
let selectedBasemap = ref<string>("streets-vector")
console.log(props.webMap)
const changeBasemap = (e:Event) =>{
selectedBasemap.value == "streets-vector"? selectedBasemap.value = "satellite" : selectedBasemap.value = "streets-vector"
emit('basemapChanged',selectedBasemap.value)
}
return {selectedBasemap, changeBasemap}
}
})
</script>
<style scoped>
.basemapWidget{
width: 50px; height: 50px;background-color: brown;
}
</style> Am I completely off base here? It seems like none of ESRI's Vue patterns match neitehr the composition API pattern nor the options API pattern that I learned in the vue tutorials I followed. Any advice is welcome.
... View more
05-20-2021
01:33 PM
|
0
|
3
|
1958
|
POST
|
Hi all, I think I've found a bug. When I'm using the 4.15 Javascript API and modifying the content of an empty expand widget, I can create a dom node for that content using the dojo/domConstruct/create method, assigning a string of HTML as the "innerHTML" of that constructed dom node, then using it as the content of an expand widget and adding that widget to the map view. Within this dom node, I have a button with the ID "applyButton". When using 4.15, I can use a watchUtils.whenTrueOnce to listen for the widget to be expanded, then assign a pre-declared variable as that button using document.getElementById. This works fine in 4.15, but when I switch to 4.16, this breaks even though the button is part of the document when that variable assignment is attempted. Does anyone know if watch utils or expands were changed between 4.15 and 4.16? I'll attach my code below but I'm using webpack so some of it might look a little weird. The dom node is created at line 374, the expand is created at line 442, then added at line 478. The code is failing at line 490. Thanks! Brian
... View more
09-23-2020
01:46 PM
|
0
|
0
|
380
|
POST
|
All, My colleague Jeff showed me that the issue seems to be that once the SDK is installed, Visual Studio looks for a "specific version" by default. Turning this option to False has updated my references and those errors disappear. I truly hate programming sometimes.
... View more
11-25-2019
01:53 PM
|
0
|
0
|
2754
|
POST
|
Thanks Hanhan, I've installed the ArcObjects SDK for my version of ArcGIS, 10.7.1, but when I open the solution for the Server Apply Watermark example in visual studio, I'm still getting the reference errors I outlined above. Any idea how to get rid of those? Is there something in Visual Studio that I'm missing? Thanks, Brian
... View more
11-25-2019
10:49 AM
|
0
|
0
|
2754
|
POST
|
Thanks Mike, Hanhan Sun below has indicated that I should be using the ArcObjects SDK to use this project. I've installed the ArcObjects SDK for my version of ArcGIS, 10.7.1, but when I open the solution in visual studio, I'm still getting the reference errors I outlined above. Any idea how to get rid of those? Is there something in Visual Studio that I'm missing? Thanks, Brian
... View more
11-25-2019
10:48 AM
|
0
|
0
|
2754
|
POST
|
Thanks for the link. Do you know how to get the ArcGIS Enterprise SDK? When you google "Download ArcGIS Enterprise SDK", you get the "Installing ArcGIS Enterprise SDK" page with no reference to where the thing comes from It's not listed as a download on the APIS and SDKs downloads page at developers.arcgis,com It's also not referenced in the system requirements page Or anywhere in the first page or table of contents for the "ArcGIS Enterprise SDK Developer guide" ESRI doesn't seem to have published any videos on their youtube when you search "ArcGIS Enterprise SDK" there. I must be really off target here...
... View more
11-21-2019
02:20 PM
|
0
|
2
|
2754
|
POST
|
Awesome, thanks. How did you know that? Is there a reliable way to figure that out myself?
... View more
11-21-2019
01:14 PM
|
0
|
4
|
2754
|
POST
|
Hi all, I'm trying to use the Server Apply Watermark example from the community samples to create an SOI that will be used to somehow watermark a depricated map or feature service. I haven't gotten too far though, as I can't even get the SDK to install to my project, which is what I suspect is causing the following reference errors: I'd love some advice but first let me explain what I think I know so far. I'm a total newbie at .Net development generally, but I'm going to take a crack at this anyway. Please correct any of these assumptions: 1. I needed to install ArcGIS for Server locally to be able to develop either an SOE or SOI. I've done this. 2. I need the current version (100.6.0 today) of the ArcGIS Runtime SDK for .Net to be installed to gain access to it in the Nuget Package Manager. 3. I need to point my project in Visual Studio to whatever the most current supported version of the .Net framework is and as indicated in the following, that version is 4.6.1: So I've done all of the above but when I go to install the SDK, I see the following prompts: Attempting to gather dependency information for package 'Esri.ArcGISRuntime.100.6.0' with respect to project 'ServerApplyWatermarkImageServiceSOI', targeting '.NETFramework,Version=v4.6.1' Gathering dependency information took 80.16 ms Attempting to resolve dependencies for package 'Esri.ArcGISRuntime.100.6.0' with DependencyBehavior 'Lowest' Resolving dependency information took 0 ms Resolving actions to install package 'Esri.ArcGISRuntime.100.6.0' Resolved actions to install package 'Esri.ArcGISRuntime.100.6.0' Adding package 'Esri.ArcGISRuntime.WPF.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages' Added package 'Esri.ArcGISRuntime.WPF.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages' Added package 'Esri.ArcGISRuntime.WPF.100.6.0' to 'packages.config' Successfully installed 'Esri.ArcGISRuntime.WPF 100.6.0' to ServerApplyWatermarkImageServiceSOI Adding package 'Esri.ArcGISRuntime.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages' Added package 'Esri.ArcGISRuntime.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages' Added package 'Esri.ArcGISRuntime.100.6.0' to 'packages.config' Successfully installed 'Esri.ArcGISRuntime 100.6.0' to ServerApplyWatermarkImageServiceSOI Executing nuget actions took 2.3 sec Time Elapsed: 00:00:02.8359139 ========== Finished ========== Great! That went smooth, and look! My project doesn't just have the Esri.ArcGISRuntime package installed, but also the ArcGISRuntime.WPF package installed. This should work, right? Wrong. The reference errors are still showing and I have a big list of errors complaining about missing assembly references. Any idea what I'm doing wrong? There isn't a whole lot of setup documentation in the repo and I'm kind of at an impasse. Thanks! Brian
... View more
11-21-2019
12:19 PM
|
0
|
9
|
3203
|
POST
|
All, I've tried running the script in VS Code and it runs straight through without issue. It looks like Pyscripter has a memory management problem. I won't be using that anymore! Brian
... View more
09-23-2019
12:26 PM
|
1
|
1
|
4365
|
POST
|
I'm not yet. The URL will be fed into a requests.get and if an error is returned, it will be written to a CSV file to be used to identify missing tiles. Pyscripter is running out of memory just iterating through the stack of tiles, without any http calls being made.
... View more
09-23-2019
08:13 AM
|
0
|
0
|
4365
|
POST
|
It's strange, I'm not seeing memory usage spike in task manager or anything. Where am I saving everything to memory? I tried to not do that. The only place I can think that I am creating anything that's saved is at the line where the url variable is defined and I have been using del url to (I thought) get rid of that shortly thereafter in each loop. I've never had to think about memory usage before so this is a new one for me . The breakdown happens after about 20 million tiles are processed successfully. I have 16 gigs of ram in this machine.
... View more
09-20-2019
03:58 PM
|
0
|
0
|
4365
|
POST
|
from lxml.etree import tostring
from lxml import etree as et
from lxml import html
from itertools import *
from tkinter import *
import requests
import gc
Cache_Service_URL = "https://data.wsdot.wa.gov/arcgis/rest/services/Shared/WebBaseMapWebMercator/MapServer"
#http://hqolymgis38d.wsdot.loc:6080/arcgis/rest/services/ILT/ILT_Basemap_2019090/MapServer
LODsList = []
LODs = []
r = requests.get(Cache_Service_URL)
doc = html.fromstring(r.content)
#parse rest endpoint to get levels of detail and their grid definitions
# URL format: https://<map service URL>/tile/<level>/<row>/<column>
#4365270
for tag in doc.iter():
if tag.text == "Level ID:":
tileDefinitions = []
parent = tag.getparent()
children = parent.getchildren()
for child in children:
if "Level ID" in tostring(child):
LODValue = tostring(child).split(" ")[2].split("&")[0]
tileDefinitions.append(LODValue)
elif "Start Tile" in tostring(child):
startTile = []
startRow = tostring(child).split(" ")[1].split("/")[9]
startColumn = tostring(child).split(" ")[1].split("/")[10].split('"')[0]
startTile.append("StartTile")
startTile.append(startRow)
startTile.append(startColumn)
tileDefinitions.append(startTile)
elif "End Tile" in tostring(child):
endTile = []
endRow = tostring(child).split(" ")[1].split("/")[9]
endColumn = tostring(child).split(" ")[1].split("/")[10].split('"')[0]
endTile.append("EndTile")
endTile.append(endRow)
endTile.append(endColumn)
tileDefinitions.append(endTile)
else:
tkMessageBox.showinfo(title="ALERT", message="Unknown HTML Node: "+ tostring(child))
tilesCount = (int(endRow)-int(startRow)+1)*(int(endColumn)-int(startColumn)+1)
tileDefinitions.append(tilesCount)
LODs.append(tileDefinitions)
#query each tile
#http://hqolymgis38d.wsdot.loc:6080/arcgis/rest/services/ILT/ILT_Basemap_2019090/MapServer/tile/0/42/16
totalTilesCount = []
for LOD in LODs:
print (LOD)
for LOD in LODs:
if LOD[0] == '10':
LODValue = int(LOD[0])
startTileRow = int(LOD[1][1])
startTileColumn = int(LOD[1][2])
endTileRow = int(LOD[2][1])
endTileColumn = int(LOD[2][2])
i = startTileRow
while i < (endTileRow+1):
j = startTileColumn
while j < endTileColumn:
print(str(LODValue) + " Row " + str(i) + " Column " + str(j))
url = Cache_Service_URL+"/tile/"+str(LODValue)+"//"+str(i)+"//"+str(j)
j+=1
'''del url
if int(i)%1000 == 0:
gc.collect()'''
i += 1
Ooh, I didn't know that existed. Let me know if you have any questions, it's a little messy.
... View more
09-20-2019
03:18 PM
|
0
|
2
|
4365
|
POST
|
Hi all, I'm working on writing a validation script to check the URL's of each tile of a cached map service. Basically, the REST endpoint URL of tiles is formatted as "https://<map service URL>/tile/<level>/<row>/<column>", giving you the number of rows and columns of the start and end tile of each level of detail cached for that service. Using these values, I use nested while loops to iterate through each cell in the grid composed of those rows and columns and will ultimately build a URL for and ping each tile to check that it doesn't respond with an error. The cache for the largest scale contains 52,398,060 individual tiles and the pyscripter throws an "out of memory" error when I try to iterate through that range. The attached code shows what I'm talking about. Is there a better way to write this or some kind of memory release I could do to make this thing work? Thanks
... View more
09-20-2019
02:59 PM
|
0
|
8
|
5796
|
POST
|
Let me know when you're thinking about retiring so I can short ESRI stock.
... View more
07-30-2019
12:23 PM
|
0
|
0
|
694
|
Title | Kudos | Posted |
---|---|---|
1 | 04-01-2019 03:01 PM | |
1 | 09-23-2019 12:26 PM | |
1 | 05-17-2019 10:18 AM |
Online Status |
Offline
|
Date Last Visited |
02-13-2024
06:13 PM
|