|
POST
|
OK - reviving thread after 3.8 says this can be done. I am trying now to merge the functionality into the context menu sample https://developers.arcgis.com/javascript/jssamples/graphics_contextmenu.html My code is Non-AMD so not sure if I can get this working. Cheers ACM PS this is as far as I have got
ctxMenuForGraphics.addChild(new dijit.MenuItem({
label: "Rotate/Scale",
onClick: function () {
if (selected.geometry.type !== "Point") {
if (selected.symbol.declaredClass === "esri.symbol.TextSymbol") {
editToolbar.activate(esri.toolbars.Edit.EDIT_TEXT, selected);
}
else {
editToolbar.activate(esri.toolbars.Edit.ROTATE | esri.toolbars.Edit.SCALE, selected);
}
} else {
alert("Not implemented");
}
}
}));
But it fails with Uncaught Error: [esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.
... View more
01-30-2014
03:49 AM
|
0
|
0
|
2508
|
|
POST
|
Are you using Windows XP (still) by any chance? WE've had exactly this (well it sounds like it) flashing black screen when over various panels. It turns out to be graphics card related with XP - to fix it we turned down the Graphic Hardware Acceleration - we found two notches down from the lowest worked fine. Credit here to Martin on our internal help desk, who had seem similar issues with other applications. Not an issue with Windows 7 (afaik) ACM
... View more
01-29-2014
08:19 AM
|
0
|
0
|
4340
|
|
POST
|
Thanks for that - could you add the bug number please, so that I can keep an eye on the release info (I'm guessing ArcGIS server is the product affected)
... View more
01-28-2014
11:26 PM
|
0
|
0
|
3917
|
|
POST
|
I did think of having text and points in different graphics layers, but that would be a big re-write. Not only do I add these to the map, but I also add the definition to Local Storage, so when users go back into the map any added annotation re-appears. I'd have to write a few extra loops within the process of retrieving the data from Local Storage. Which I can do, but if there was an acceptance that this was a bug then I can tell the users that and hope esri fix it.
... View more
01-28-2014
12:50 AM
|
0
|
0
|
3917
|
|
POST
|
and this one is text first
{
"mapOptions": {
"showAttribution": true,
"extent": {
"xmin": 283587.7543757293,
"ymin": 78359,
"xmax": 342600.2456242707,
"ymax": 113602,
"spatialReference": {
"wkid": 27700
}
},
"spatialReference": {
"wkid": 27700
},
"scale": 155427.79855309209
},
"operationalLayers": [{
"id": "mainbasemaps",
"title": "mainbasemaps",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/BaseMapOSNonTiled/MapServer",
"visibleLayers": null,
"layers": []
}, {
"id": "altbasemaps",
"title": "altbasemaps",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/alt_basemaps/MapServer",
"visibleLayers": null,
"layers": []
}, {
"id": "aerialmaps",
"title": "aerialmaps",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/LIVEinternal/aerials/MapServer",
"visibleLayers": null,
"layers": []
}, {
"id": "mainmap",
"title": "mainmap",
"opacity": 0.9,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/test/emap2/MapServer",
"visibleLayers": [],
"layers": []
}, {
"id": "graphicsLayer0",
"minScale": 750,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}, {
"id": "usergraphics",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": [{
"layerDefinition": {
"name": "pointLayer",
"geometryType": "esriGeometryPoint"
},
"featureSet": {
"geometryType": "esriGeometryPoint",
"features": [{
"geometry": {
"x": 312785.5723453909,
"y": 85884.63477246207,
"spatialReference": {
"wkid": 27700
}
},
"symbol": {
"color": [0, 0, 0, 255],
"type": "esriTS",
"horizontalAlignment": "left",
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"text": "text first",
"rotated": false,
"kerning": true,
"font": {
"size": 54,
"style": "normal",
"variant": "normal",
"decoration": "none",
"weight": "normal",
"family": "verdana"
}
}
}, {
"geometry": {
"x": 311140.62485414237,
"y": 84239.68728121354,
"spatialReference": {
"wkid": 27700
}
},
"symbol": {
"color": [0, 0, 0, 255],
"size": 54,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSCircle",
"outline": {
"color": [255, 0, 0, 255],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
}
}
}]
}
}]
}
}, {
"id": "graphicsLayer1",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}, {
"id": "graphicsLayer2",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}, {
"id": "map_graphics",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}],
"exportOptions": {
"outputSize": [2125.98, 2362.2],
"dpi": "96"
},
"layoutOptions": {
"titleText": "",
"authorText": " ",
"copyrightText": "Crown Copyright and database rights 2014 Ordnance Survey 100023746 ",
"scaleBarOptions": {
"metricUnit": "Kilometers",
"metricLabel": "km",
"nonMetricUnit": "Miles",
"nonMetricLabel": "mi"
},
"legendOptions": {
"operationalLayers": [{
"id": "mainmap"
}]
}
}
}
... View more
01-27-2014
05:54 AM
|
0
|
0
|
6313
|
|
POST
|
Of first of two posts - this is the "ioArgs.content.Web_Map_as_JSON" for text added last
{
"mapOptions": {
"showAttribution": true,
"extent": {
"xmin": 283587.7543757293,
"ymin": 78359,
"xmax": 342600.2456242707,
"ymax": 113602,
"spatialReference": {
"wkid": 27700
}
},
"spatialReference": {
"wkid": 27700
},
"scale": 155427.79855309209
},
"operationalLayers": [{
"id": "mainbasemaps",
"title": "mainbasemaps",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/BaseMapOSNonTiled/MapServer",
"visibleLayers": null,
"layers": []
}, {
"id": "altbasemaps",
"title": "altbasemaps",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/alt_basemaps/MapServer",
"visibleLayers": null,
"layers": []
}, {
"id": "aerialmaps",
"title": "aerialmaps",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/LIVEinternal/aerials/MapServer",
"visibleLayers": null,
"layers": []
}, {
"id": "mainmap",
"title": "mainmap",
"opacity": 0.9,
"minScale": 0,
"maxScale": 0,
"url": "http://eddc-gis2/arcgis/rest/services/test/emap2/MapServer",
"visibleLayers": [],
"layers": []
}, {
"id": "graphicsLayer0",
"minScale": 750,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}, {
"id": "usergraphics",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": [{
"layerDefinition": {
"name": "pointLayer",
"geometryType": "esriGeometryPoint"
},
"featureSet": {
"geometryType": "esriGeometryPoint",
"features": [{
"geometry": {
"x": 314019.2829638273,
"y": 87077.22170361727,
"spatialReference": {
"wkid": 27700
}
},
"symbol": {
"color": [0, 0, 0, 255],
"size": 54,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSCircle",
"outline": {
"color": [255, 0, 0, 255],
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSSolid"
}
}
}, {
"geometry": {
"x": 318090.52800466743,
"y": 84938.78996499417,
"spatialReference": {
"wkid": 27700
}
},
"symbol": {
"color": [0, 0, 0, 255],
"type": "esriTS",
"horizontalAlignment": "left",
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"text": "text last",
"rotated": false,
"kerning": true,
"font": {
"size": 54,
"style": "normal",
"variant": "normal",
"decoration": "none",
"weight": "normal",
"family": "verdana"
}
}
}]
}
}]
}
}, {
"id": "graphicsLayer1",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}, {
"id": "graphicsLayer2",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}, {
"id": "map_graphics",
"minScale": 0,
"maxScale": 0,
"featureCollection": {
"layers": []
}
}],
"exportOptions": {
"outputSize": [2125.98, 2362.2],
"dpi": "96"
},
"layoutOptions": {
"titleText": "",
"authorText": " ",
"copyrightText": "Crown Copyright and database rights 2014 Ordnance Survey 100023746 ",
"scaleBarOptions": {
"metricUnit": "Kilometers",
"metricLabel": "km",
"nonMetricUnit": "Miles",
"nonMetricLabel": "mi"
},
"legendOptions": {
"operationalLayers": [{
"id": "mainmap"
}]
}
}
}
... View more
01-27-2014
05:53 AM
|
0
|
0
|
6313
|
|
POST
|
OK - old thread and probably old issue, but one just reported to me. By using the advice above my text prints fine - the size is correct and it all looks OK. HOWEVER If the user adds a graphic point first - just that a point. Then adds text, when it prints no text is printed If the user adds text first, the a plain point, just the text is printed. Any ideas before I start pulling my code apart. ACM
... View more
01-27-2014
05:15 AM
|
0
|
0
|
6313
|
|
POST
|
🙂 marked as helpful as you've got further than I did late last year - I had the same idea, but failed totally to get as far as you did. What's your idea for options? Mine is things like labels on/of This would make a very good TOC, great.
... View more
01-15-2014
12:31 AM
|
0
|
0
|
1408
|
|
POST
|
😞 Hello, Our development team is currently working on the issue. Most likely, it will be fixed in the upcoming release. Thanks! Still an issue with 3.8.
... View more
01-04-2014
06:12 AM
|
0
|
0
|
1713
|
|
POST
|
Hi I currently use the OOB measure widget, but it is limited. I really like what this site does http://206.107.103.203/ (under map tools) [ATTACH=CONFIG]30096[/ATTACH] Not only is it nice, but the code dropped into my code and worked straight away! Partly as I had a geometryService variable already defined. However, it does use Jquery with lots of lines like " $(".caption").addClass("ui-priority-primary");" I don't use jquery, never have, and really don't want to add it just for this. Has anyone a similar tool to this ? What I like is that it recreates my ArcIMS experiance for users. One simple tool, measures line length and closure area at the same time and returns segment length. Many thanks to Edgecombe County for this in case they are present. ACM
... View more
12-24-2013
03:42 AM
|
0
|
0
|
870
|
|
POST
|
looks nice - one thing that I am trying to do with my current TOC is to re-create the ArcIMS TOC from David Bollinger. In this one there was an option of a "toggle group" (I think it was called) where only one item was allowed on. For me I would use it for the TOC for my aerial map service, so only one year's photos can be requested. Getting more than one year is silly as they just appear on top of each other (until I work out layer based transparency sliders) and have a resource hit on the server. ACM
... View more
12-22-2013
11:14 PM
|
0
|
0
|
808
|
|
POST
|
Yes - I had to move various bits to my init function. As I use the constrained floating pane, I don't know which bits are relevant, so here is all the bits I had to move into my init function
var ParentConstrainedFloatingPane = dojo.declare(dojox.layout.FloatingPane, {
postCreate: function ()
{
this.inherited(arguments);
this.moveable = new dojo.dnd.move.parentConstrainedMoveable(
this.domNode, {
handle: this.focusNode,
area: "content",
within: true
}
);
}
});
var BoxConstrainedFloatingPane = dojo.declare(dojox.layout.FloatingPane, {
postCreate: function ()
{
this.inherited(arguments);
this.moveable = new dojo.dnd.move.boxConstrainedMoveable(
this.domNode, {
handle: this.focusNode,
box: { l: 10, t: 10, w: 400, h: 400 },
within: true
}
);
}
});
var ConstrainedFloatingPane = dojo.declare(dojox.layout.FloatingPane, {
postCreate: function ()
{
this.inherited(arguments);
this.moveable = new dojo.dnd.move.constrainedMoveable(
this.domNode, {
handle: this.focusNode,
constraints: function ()
{
var coordsBody = dojo.coords(dojo.body());
// or
var coordsWindow = {
l: 0,
t: 0,
w: window.innerWidth,
h: window.innerHeight
};
return coordsWindow;
},
within: true
}
);
}
});
var pFloatingPane;
dojo.ready(function ()
{
//add popup floating pane for in
var dock = new dojox.layout.Dock({
id: 'dock',
style: 'position:absolute; bottom:0; right:0; height:500px; width:0px; display:none; z-index:0;'
//tuck the dock into the the bottom-right corner of the app
}, dojo.create('div', null, dojo.body()));
//find size of the map so to get the best possible initial size for the user
popX = map.width * 0.66;
popY = map.height * 0.66;
pFloatingPane = new ConstrainedFloatingPane({
title: "Layer Info",
resizable: true, //allow resizing
closable: false, //we never want to close a floating pane - this method destroys the dijit
dockable: true, // yes we want to dock it
dockTo: dock,
style: 'position:absolute;top:90px;left:340px;width:' + popX + 'px;height:' + popY + 'px;visibility:hidden;overflow:hidden;',
id: "pFloatingPane"
}, dojo.create('div', null, dojo.body()));
dojo.connect(pFloatingPane, 'onFocus', function ()
{
dijit.byId('pFloatingPane').bringToTop();
// alert(1)
});
//do the same for onShow
dojo.connect(pFloatingPane, 'onShow', function ()
{
dijit.byId('pFloatingPane').bringToTop();
});
dojo.connect(pFloatingPane, "onDock", function ()
{
// alert(1)
});
//add popup for draw tools
var drawtools = new ConstrainedFloatingPane({
id: 'drawtools',
title: 'Drawing Tools',
href: 'common/draw.html',
resizable: false,
closable: false,
dockable: true,
dockTo: dock,
style: 'position:absolute;top:100px;left:50px;width:450px;height:480px;visibility:hidden;overflow:hidden;'
},
dojo.create('div', null, dojo.body()));
dojo.connect(drawtools, 'onFocus', function ()
{
dijit.byId('drawtools').bringToTop()
});
dojo.connect(drawtools, 'onShow', function ()
{
dijit.byId('drawtools').bringToTop()
r1 = dijit.byId('radio2')
//it's late, I want to go home, so classic bodge here
if (r1) {
dijit.byId('radio1').set('checked', false);
dijit.byId('radio2').set('checked', false);
dijit.byId('radio3').set('checked', false);
dijit.byId('radio4').set('checked', false);
dijit.byId('radio5').set('checked', false);
}
});
dojo.connect(drawtools.dockNode, 'click', function ()
{
drawToolbar.deactivate(); enableID();
});
pFloatingPane.startup();
dojo.forEach(dojo.query('.dojoxFloatingMinimizeIcon'), function (i)
{
dojo.attr(i, 'onmouseover', 'dojo.style(this, "backgroundPosition", "-21px 50%")');
dojo.attr(i, 'onmouseout', 'dojo.style(this, "backgroundPosition", "0 0")');
dojo.attr(i, 'onmousedown', 'dojo.style(this, "backgroundPosition", "-42px 50%")')
});
});
Hope that helps.
... View more
12-17-2013
11:17 PM
|
0
|
0
|
1526
|
|
POST
|
bump - this is now a breaking issue. IE10 (running in IE9 mode to get around the zoom box issue) is breaking and simply locking up with this message within minutes. Linked to line 8840 in my case. Seems to be tied in with a request for an identify task. On my expanded version of the init.js file this seems to be the dad part var q = b(a.document, "mousedown, touchstart", function (a) { f._justMouseDowned = !0;
setTimeout(function () {
f._justMouseDowned = !1
}, 0); I wonder if it is the touchstart event that is the issue? I can't see a similar chunk in 3.5 .Edit - so I removed the touchstart event from that bit of code and so far no errors - hard to say for sure as it didn't always happen. But the ammount of testing I have done would have triggered it .
... View more
12-09-2013
01:51 AM
|
0
|
0
|
2354
|
|
POST
|
Cheers - not sure if the server restart helped or your extra lines. But I'll leave them all in. I added a IISRESET for good measure! I am doing this as I have some tasks that need exclusive locks on layers and it is easier to shut the whole thing down.
... View more
12-08-2013
01:19 AM
|
0
|
0
|
5412
|
| 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
|