|
POST
|
Mark as the answer - many thank - I think I need a bit more tweaking in my next bit of code, but I hink the wait is there now. Cheers
... View more
11-27-2017
08:39 AM
|
0
|
0
|
1346
|
|
POST
|
I gave it a very quick go - a slight modification, not "dojo._base.lang.hitch" but "dojo.hitch" - that gets it "working" - it is giving me loads of proxy errors now - but I'll have to look at them a different day Many thanks
... View more
11-27-2017
08:05 AM
|
0
|
0
|
1346
|
|
POST
|
Many thanks - Embarrassingly, when I was searching for an answer, I found I'd already asked the same question in March! Anyway, I'll give that a go when I have time and get back. For now I put a awful hack in the part that calls this info not to fire off until the array length of LayerDescriptions equals the number of layers
... View more
11-27-2017
07:57 AM
|
0
|
1
|
1346
|
|
POST
|
OK - I've a site I wrote years back which did work, but now due to a data centre move I realise it onl;y worked becasue the requests were resolved quickly, on the "new" network my code needs attention for timing. I have this dojo.connect(dynamicMapServiceLayer, "onLoad", function () {
var content = "";
var i = 0
//return the layer descriptions and © text into arrays - we use this later for the info dialog to generate hyperlinks and © text
dojo.forEach(dynamicMapServiceLayer.layerInfos, function (layer) {
//console.debug(dynamicMapServiceLayer.layerInfos[layer.id])
var requestHandle = esri.request({
url: mapserviceCustom + "/" + layer.id + "?f=json",
handleAs: "json",
load: function (data) {
LayerAttach[layer.id] = data.hasAttachments;
LayerDescriptions[layer.id] = data.description;
//LayerCopyright[layer.id] = data.copyrightText;
console.debug(dynamicMapServiceLayer)
dynamicMapServiceLayer.layerInfos[layer.id].copyrightText = data.copyrightText;
},
}, { useProxy: true });
});
}); That runs during the init of my site and gets more info from the REST of the service regarding each layer, I use this to dynamically control the copyright notice on the map, as this varies per layer. I store this info in the layer description. I've not looked at this for a long time, but I know I need to do something to stop the rest of the code working until all this has run, as a later part of my init code will use the results - but my hack skills are exhausted. Most of the site is in legacy and most examples I have found are in AMD. So any help gratefully received. Cheers ACM
... View more
11-26-2017
09:23 AM
|
0
|
4
|
1488
|
|
POST
|
Odd - i tried that yesterday, but gave up when the results looked like "0x346......." rather than "POLYGON(1234,.....) But I saved the view and flung it at ArcMap and it worked. Thanks
... View more
05-17-2017
04:37 AM
|
0
|
0
|
1495
|
|
POST
|
I found this thread just after I posted a similar question here https://community.esri.com/message/687252-sql-view-to-sanitize-geometrycollections I'd appreciate any comments to help me with this nastiness.
... View more
05-16-2017
08:20 AM
|
1
|
1
|
3588
|
|
POST
|
Hi We've a third party spatial application that writes into native T-SQL tables. It is happy with records like this; GEOMETRYCOLLECTION (LINESTRING (315271.762 90124.145, 315271.812 90124.195), POLYGON ((315276.18 90120.38, 315275.05 90111.07, 315280.15 90110.42, 315279.36 90103.58, 315271.65 90104.25, 315267.35 90104.62, 315267.319 90104.625, 315267.681 90107.209, 315268.95 90117.12, 315272.94 90116.62, 315273.32 90118.96, 315270.73 90119.4, 315270.91 90120.92, 315271.36 90124.08, 315276.432 90123.633, 315276.18 90120.38))) Anyone who has only ever used Esri products will, like me, be twitching at this mixing up stuff in a single record. Anyone have any SQL views or procedures to sanitize these records into a format that sane GIS products can cope with? Cheers ACM
... View more
05-16-2017
08:09 AM
|
0
|
3
|
2224
|
|
POST
|
I thought as much - we think we'll warehouse the data in SQL and do the conversion there. We don't like messing around in Oracle. Thanks
... View more
05-09-2017
05:21 AM
|
0
|
0
|
921
|
|
POST
|
Hi We have a third party application with data stored in Oracle. There is a table with text fields for east/north. We want to create an Event Layer. We cannot modify the table and as it is 3rd party don't want to add an Oracle view as it may mess with the support. So, anyone any ideas if it is possible to cast/convert text fields within Desktop to create an event theme? Cheers ACM
... View more
05-09-2017
05:16 AM
|
0
|
2
|
1062
|
|
POST
|
Yes, I seen some scripts that alter the draft file XML, I may look at those - in the mean time it is back to logging on on Sunday mornings to update services 😞
... View more
04-30-2017
02:34 AM
|
0
|
0
|
825
|
|
POST
|
Hi I've found lots of scripts that take a MXD and publish it, or take a sddraft file. However these all seem to create a new service with the default settings. I really need a script that replicates the "Share As>>Map Service>>Overwrite and existing service" menu options in Desktop. It would be nice if at the end of this Wizard there was an option to save what you have as a sddraft, as at that point it has picked up all the settings from the existing service. Have I missed something here? Cheers ACM
... View more
04-28-2017
04:29 AM
|
0
|
2
|
1339
|
|
POST
|
Thanks - that is helpful and it helps me understand a bit more. However, I really need to wrap the entire onLoad function up to give it a "then" - I've got to move onto other stuff right now, but I've just found this post https://community.esri.com/thread/30458 which looks super useful. This one also looks promising Connect to onExtentChange with deferred web maphttps://community.esri.com/thread/65042
... View more
03-13-2017
03:44 AM
|
1
|
0
|
1392
|
|
POST
|
Hi I have an awful web app that is mainly legacy code I wrote many years back, but functions and the users use it all the time WE're moving stuff around and at the moment the desktops are at a different site to the data so I'm hitting latency issues. I have this code //return the layer descriptions and © text into arrays - we use this later for the info dialog to generate hyperlinks and © text
dojo.forEach(dynamicMapServiceLayer.layerInfos, function (layer) {
var requestHandle = esri.request({
url: mapservice2 + "/" + layer.id + "?f=json",
handleAs: "json",
load: function (data) {
LayerAttach[layer.id] = data.hasAttachments;
console.debug(dynamicMapServiceLayer.layerInfos[layer.id])
LayerDescriptions[layer.id] = data.description;
dynamicMapServiceLayer.layerInfos[layer.id].copyrightText = data.copyrightText;
},
}, { useProxy: true });
}); Which I have on the Onload event of the main dynamic map It reads extra stuff from the rest data of the service that I use to create hyperlinks (as good old ArcIMS did) All worked fine until this latency hit. I have a sub-site that on start up takes a feature passed in the URL, finds the extent of that feature, then passes that into a ID task on the main service. The output uses the arrays/data produced in the above routine. With the latency I am getting results of the ID task back before I get all the info from the above code. I have vague knowledge of defers and the like so surely I should add to each loop above a wait until the data is back until stepping forward, or a wait until everything is back Any advice welcomed. In the short term I've given those users who use this sub-site Chrome, which can handle things faster and not get caught up. Cheers ACM
... View more
03-10-2017
08:12 AM
|
0
|
2
|
2271
|
|
POST
|
cheers - I was nearly there from a few other samples. I'll give that a quick go before heading home. Many thanks
... View more
08-31-2016
09:22 AM
|
0
|
0
|
570
|
|
POST
|
I may be being thick here, but my "results" object hasn't got a "features" property, it has lots of "features" (0-Number of results-1) My function that runs when the Find is executed is function showResults(results) {
var features = results.features;
var outFeature = dojo.filter(features, function (feat) {
return feat.attributes.LA == 'EDDC';
});
.
.
.
Which returns an empty array (it doesn't fall over, which is odd)
... View more
08-31-2016
09:10 AM
|
0
|
2
|
2619
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-28-2025 01:14 AM | |
| 1 | 12-01-2023 06:07 AM | |
| 2 | 11-29-2024 04:32 AM | |
| 1 | 05-28-2024 12:50 AM | |
| 1 | 03-16-2023 06:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|