|
POST
|
I have some code. It is normally is OK in Chrome It was flaky in IE10. The chunk that didn't work checked to see if a URL parameter was passed, if so, it set a query layer, used the passed parameter for a query task, got the extent of the query results and set map extent to it. I had it all in my general init function. Most times in IE it would fail to re-draw the map. However a slight pan would put the map in the correct place (plus the slight pan of course) I moved this code into the onLayersAddResult event of the map. In IE it works a lot better,but still fails about 10% of the time. Are any events after onLayersAddResult I can hook up to? Or any other tricks to get my timing right? Cheers ACM
... View more
12-01-2014
07:44 AM
|
0
|
4
|
2534
|
|
POST
|
More research and it appears to work when I have a layer that has not been enabled for attachments, but fails as soon as I enable it for attachments.
... View more
11-26-2014
06:24 AM
|
0
|
0
|
4799
|
|
POST
|
I'm geting this too - but ONLY when the basemaps I am using offline are my own, stored on the iPhone 5. My basemap is of the same projection as my data, but NOT the same as the esri ones. Is this likely to be an issue?
... View more
11-25-2014
06:03 AM
|
0
|
1
|
4799
|
|
POST
|
So am I right in thinking that on my nice, shiny Collector app I'm about to give to officers, I cannot include other, read only, non-versioned layers as reference layers?
... View more
11-20-2014
02:14 AM
|
0
|
1
|
2264
|
|
POST
|
No problem - I'm using your code as a way of getting my basemap as the initial one. It may work.................
... View more
11-17-2014
07:46 AM
|
0
|
0
|
2325
|
|
POST
|
This is the example I am working with Is it possible to use BasemapToggle with custom basemaps? But not sure how to get the map to initially work with one of my basemaps as well
... View more
11-17-2014
07:41 AM
|
0
|
0
|
2325
|
|
POST
|
Thanks, but that is using the gallery widget - I'm after a solution that uses the Toggle widget - I've seen a few examples and working on them now.
... View more
11-17-2014
07:37 AM
|
0
|
3
|
2325
|
|
POST
|
Brill - that worked as well - much better than playing with options I had no idea about, many thanks
... View more
11-17-2014
07:29 AM
|
0
|
1
|
2667
|
|
POST
|
Not sure I know where to put that. However, I replaced the * in the http://server/arcgis/admin/system/handlers/rest/servicesdirectory With some random text and that sorted it. I think too many things were trying to do the same thing - I have really no idea what I am talking about.
... View more
11-17-2014
06:40 AM
|
0
|
3
|
2667
|
|
POST
|
bump - still getting this - anyone any ideas how to make it stop?
... View more
11-17-2014
05:29 AM
|
0
|
5
|
2667
|
|
POST
|
OK, I am having issues getting my head round all these items whilst using my own basemaps. In my code, I create the map object. I do not set the basemap property. I want to add two basemaps, a topo and photographic I can see how to add to them to a gallery, but by that time the map object is defined, so how do I set the basemap? I keep going round in circles - this is as far as I have got. - mainly from example code
map = new Map("mapDiv", {
logo: false
});
var basemapGallery = new BasemapGallery({
showArcGISBasemaps: false,
map: map
}, "basemapGallery");
basemapGallery.startup();
var layer = new BasemapLayer({
url: "http:/xxx/arcgis/rest/services/bmap1/MapServer"
});
var basemap = new Basemap({
id:"StreetMap",
layers: [layer],
title: "Street Map",
thumbnailUrl: "pin.gif"
});
basemapGallery.add(basemap);
var layer2 = new BasemapLayer({
url: "http://xxx2/arcgis/rest/services/LIVEinternal/aerials/MapServer"
});
var aerial = new Basemap({
layers: [layer2],
title: "Aerials",
thumbnailUrl: "pin.gif"
});
basemapGallery.add(aerial);
console.debug(basemapGallery)
var toggle = new BasemapToggle({
map: map,
basemap: "StreetMap"
}, "BasemapToggle");
toggle.startup();
But hit issues - what do I use in the Basemap property of the toggle - the help says "The secondary basemap to toggle to." but the ID, the title? I've tried both and they both fail with various errors Also, how do you get the initial basemap of the map object. Is it just me, or does the official help really suck when it comes to daring to use your own data?
... View more
11-17-2014
04:42 AM
|
1
|
5
|
5095
|
|
POST
|
Slly me - the code wanted different parameters for tiled (which I used before) and dynamic. Dynamic only wanted url - leaving original post there as a pointer for others
... View more
11-14-2014
09:27 AM
|
0
|
0
|
724
|
|
POST
|
Hi I have used code derived from http://warblingdiode.blogspot.co.uk/2010/02/watermarking-your-maps-with-esri-arcgis.html#comment-form Before quite well. I have now created a new site, and am being good, using AMD and stuff. Yet it fails This is the code I use, all in the function thingy of the initial require.
dojo.declare("myScripts.WatermarkLayer", DynamicMapServiceLayer, {
startExtent: new Extent({ xmin: 0, ymin: 0, xmax: 700000, ymax: 1300000, spatialReference: { wkid: 27700 } }),
//construct the layer
constructor: function (args) {
this.initialExtent = this.fullExtent = this.startExtent;
this.spatialReference = this.initialExtent.spatialReference;
dojo.mixin(this, args);
//set layer loaded property and fire onLoad event
this.loaded = true;
this.onLoad(this);
},
getImageUrl: function (extent, width, height, callback) {
try {
callback(this.url);
}
catch (ex) {
console.debug("Error getting Watermark image. " + ex.message);
}
},
_errorCallback: function (err) {
console.error(err.message);
}
});
wm = new myScripts.WatermarkLayer({ watermarkUrl: "Logo.png" })
wm.setOpacity(1);
map.addLayer(wm);
console.debug(wm)
console.debug(map)
It doesn't error - the console of the wm object shows what I would expect. The console of the map object shows the lyaer added. yet I get GET http://dev/test/null 404 (Not Found) Error - and I get this every time I zoom in or out, which indicates it isn't finding the watermark image It's late on a Friday - if anyone thinks they can help I can put all code live somewhere next week ACM
... View more
11-14-2014
09:09 AM
|
0
|
1
|
1151
|
|
POST
|
Many thanks for that fiddle - I've just hit a similar issue (user collects in google maps, want to display in our 27700 maps) and a slightly modified version of your code works a treat.
... View more
11-14-2014
06:27 AM
|
0
|
0
|
3391
|
|
POST
|
Looking at a Fiddler trace for the requests that get fired off when my web app is starting, it has quite a few results that give a http 401 return, then get asked for again and works - see below. I am using the latest (beta 1.1) proxy Is this normal?
... View more
11-11-2014
02:25 AM
|
0
|
0
|
727
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-19-2026 12:29 AM | |
| 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 |
| Online Status |
Offline
|
| Date Last Visited |
Tuesday
|