|
POST
|
Fantastic! Thank you!. Otherwise, the widget as setup by the default foldable theme looks like a side panel.
... View more
11-20-2015
09:30 AM
|
0
|
0
|
2513
|
|
POST
|
Yes, that's correct. Sorry for not been clear. I thought the code provided showing the widget under the widgetpool would indicate its type. Thank you.
... View more
11-20-2015
08:43 AM
|
0
|
3
|
2513
|
|
POST
|
Thank you Robert. Yes, I can do that for an on-screen widget. My question is for the foldable theme only and for on-panel widgets. The code shows the widget is under the widget pool block. I am trying to manage the size and location of a on panel widget that is on the foldable theme. I can change the on-panel widget location and size on other themes. Is anything in the documentation that refers to these limitations for this theme? Thank you.
... View more
11-20-2015
08:27 AM
|
0
|
5
|
2513
|
|
POST
|
This question was asked before, last year by another user, of how to change the size of an on-panel foldable widget and got no working answer. Hopefully, someone has a suggestion. I tried to modified the config.json, but it seems the theme overrides it "widgetPool": { "panel": { "uri": "themes/FoldableTheme/panels/FoldablePanel/Panel", ---------- ----------- } }, "widgets": [ { ----------- -------- { "label": "mywidget", "uri": "widgets/mywidget/Widget", "position": { "left": 55, "top": 45, "height":300 }, "index": 3 }]}, and I tried the panel manager var pm = PanelManager.getInstance().getPanelById(this.id + '_panel'); pm.resize({h:300}); and it still doesn't work. Can we change location and size of the widget in the foldable theme?
... View more
11-19-2015
02:02 PM
|
0
|
7
|
6171
|
|
POST
|
This question was asked before, last year, of how change the size of an on-panel foldable widget and got no working answer. Hopefully, someone has a suggestion. I tried to modified the config.json, but it seems the theme overrides it "widgetPool": { "panel": { "uri": "themes/FoldableTheme/panels/FoldablePanel/Panel", ---------- ----------- } }, "widgets": [ { ----------- -------- { "label": "mywidget", "uri": "widgets/mywidget/Widget", "position": { "left": 55, "top": 45, "height":300 }, "index": 3 }]}, and I tried the panel manager var pm = PanelManager.getInstance().getPanelById(this.id + '_panel'); pm.resize({h:300}); and it still doesn't work. Can we change location and size of the widget in the foldable theme?
... View more
11-19-2015
01:14 PM
|
0
|
0
|
2532
|
|
POST
|
Thank you. How do I access the labels assigned for the context menu of a graphic? I tried ctxMenuForGraphics.MenuItem.label[0] but it doesn't work. I notice that when you assigned a menu to a graphic A and then a bigger graphic B with its own menu covers graphic A, even if you remove the graphic B later, the menu A will be changed to the one that graphic B had. Strange and I am trying to keep the menu for graphics A unchanged.
... View more
11-18-2015
02:57 PM
|
0
|
1
|
1087
|
|
POST
|
I noticed that inside the click function of a context menu I don't have access to the map object or call a new function outside the context menu. Are these limitations for the context menus? for the script below, I get these errors.... Cannot read property 'addLayer' of undefined this.myfunction is not a function --------- ctxMenuForGraphics = new Menu({}); ctxMenuForGraphics.addChild(new MenuItem( { label: "something", onClick: function () { this.map.addLayer(xxx); this.myfunction(); } })); ctxMenuForGraphics.startup(); -------- }, myfunction: function(){ ---- }, -----------
... View more
11-18-2015
11:37 AM
|
0
|
3
|
3811
|
|
POST
|
Thank you Robert. I was hoping for the mouse-over. I guess we cannot replicate all flex functions to dojo and vice versa.
... View more
11-18-2015
10:37 AM
|
0
|
0
|
946
|
|
POST
|
In flex, I was able to create a context menu and a tooltip (infotemplate) for the same point on a gL. It seems that in JS is either one or the other. If I script out the infotemplate, the context menu appears, otherwise I will see the tooltip only. so can they coexist? ----------------------------- this.createcontextmenu(); this.setinfotemplate(); on(myGraphicsLayer, 'mouse-over', lang.hitch(this, function (event) { this.map.graphics.clear; var graphic = event.graphic; if (graphic.attributes.name === "my point") { this.map.infoWindow.setFeatures([graphic]); this.map.infoWindow.setContent(myGraphicMarker.getContent()); this.map.infoWindow.setTitle(myGraphicMarker.getTitle()); this.map.infoWindow.show(event.screenPoint, this.map.getInfoWindowAnchor(event.screenPoint)); } this.map.graphics.on("mouse-out", lang.hitch(this, function () { this.map.infoWindow.hide(); })); })); }, createcontextmenu: function(){ ctxMenuForGraphics = new Menu({}); ctxMenuForGraphics.addChild(new MenuItem({ label: "info", onClick: lang.hitch(this, function (event) { if (selectedGraphic != null) { some code } }) })); ctxMenuForGraphics.addChild(new MenuItem( { label: "Delete", onClick: function () { some code } })); ctxMenuForGraphics.startup(); on(myGraphicsLayer, 'mouse-over', lang.hitch(this, function (evt) { if (evt.graphic.attributes.name === "my point") { selectedGraphic = evt.graphic; ctxMenuForGraphics.bindDomNode(evt.graphic.getDojoShape().getNode()); }; })); on(myGraphicsLayer, 'mouse-out', lang.hitch(this, function (evt) { if (evt.graphic.attributes.name === "my point") { ctxMenuForGraphics.unBindDomNode(evt.graphic.getDojoShape().getNode()); } })); setinfotemplate: function() { var infotip = new InfoTemplate(); tip = "<font color='#FF0000'>some text</b></font>"; infotip.setContent(tip); infotip.setTitle("Location Info"); myGraphicMarker.setInfoTemplate(infotip); // } },
... View more
11-16-2015
04:59 PM
|
0
|
2
|
3793
|
|
POST
|
I have this script that defines a point, it draws the point at the correct location but it centers the map at the wrong place! Why? Thanks. startup: function() { this.inherited(arguments); pointSymbol = new SimpleMarkerSymbol( SimpleMarkerSymbol.STYLE_CIRCLE, 10, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 0, 0]), 1), new Color([0, 204, 0]) ); myGraphicPoint = new Point([-121.07462622, 38.90015662]); myGraphicMarker = new Graphic(myGraphicPoint, pointSymbol); myGraphicMarker.setAttributes({"name":"Project Spot"}); myGraphicsLayer = new GraphicsLayer(); myGraphicsLayer.add(myGraphicMarker); this.map.addLayer(myGraphicsLayer); this.map.centerAndZoom(myGraphicPoint.geometry, 8); },
... View more
11-15-2015
04:33 PM
|
0
|
1
|
3955
|
|
POST
|
I am using the launchpad and I wanted have the buffer widget along the attribute table open at the same time. As you change the parameters in the buffer widget, the attribute table would update accordingly. Possible?
... View more
11-12-2015
02:19 PM
|
0
|
0
|
1251
|
|
POST
|
A childish mistake. I assumed that the parameter in the this.appConfig.widgetOnScreen.widgets is the widget id and I didn't notice the array. Yes, it works now. However, when the Buffer Selection widget opens it closes the widget that calls it. How can I retain both widgets visible? Thank you.
... View more
11-12-2015
01:47 PM
|
0
|
2
|
4115
|
|
POST
|
Hmm. I am wondering what do I do wrong. config.json: "widgetOnScreen": { "widgets": [ { "uri": "widgets/BufferSelection/Widget", "version": "1.3", "id": "widgets_BufferSelection_53", "name": "BufferSelection", "label": "Buffer Selection", "openAtStart": false }, ............. widget.js of another widget that calls the Buffer Selection ......... var pm = PanelManager.getInstance(); pm.showPanel(this.appConfig.widgetOnScreen.widgets["widgets_BufferSelection_53"]); ........ and I get the error: Cannot read property 'id' of undefined for the second line above
... View more
11-12-2015
01:24 PM
|
0
|
4
|
4115
|
|
POST
|
Robert, for on screen widget that is not visible and not started, I tried this but it does not open the widget var wm =WidgetManager.getInstance(); wm.openWidget("widgets_BufferSelection_53"); The widgets_BufferSelection_53 is the widget id as identified in the config.json Thanks.
... View more
11-12-2015
09:44 AM
|
0
|
8
|
4115
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-09-2026 12:44 PM | |
| 1 | 06-08-2026 12:12 PM | |
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|