|
POST
|
Great! Glad to help 😃 Feel free to make another thread if you have any issues with internationalization. Lastly, please mark this thread as 'answered' if you are completely satisfied with the responses received thus far.
... View more
01-23-2014
06:55 AM
|
0
|
0
|
1181
|
|
POST
|
No problem! It tripped me up at first too, I promise. I basically had to realize that 'ZOOM_IN' was the name of the constant, but not the value. Additionally, the constant is a property of the esri.toolbars.Navigation object, justifying the need to reference the full-path. For the record, I do agree that the documentation should probably make that a bit more clear Make sure you mark the thread as 'answered' if you are completely satisfied.
... View more
01-23-2014
06:52 AM
|
0
|
0
|
1504
|
|
POST
|
If you use the console to inspect "esri.toolbars.Navigation.ZOOM_IN", you'll see its actually a string (or constant, per the documentation you linked). The string value is "zoomin" Proper Syntax: navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN); This works as well: navToolbar.activate("zoomin"); When you try to use: navToolbar.activate(ZOOM_IN); ZOOM_IN is not defined (nor is it one of the expected strings), so logically it will not work.
... View more
01-23-2014
05:59 AM
|
0
|
0
|
1504
|
|
POST
|
Hi Vince! I need a bit more code context. Can you recreate the issue using http://jsfiddle.net ? Thanks!
... View more
01-23-2014
05:43 AM
|
0
|
0
|
2747
|
|
POST
|
This is a scope issue. Instead of using javascript inline with your HTML, try creating the event inside your require block using dojo/on.
... View more
01-23-2014
05:38 AM
|
0
|
0
|
1336
|
|
POST
|
Hi Tracy! I missed this thread yesterday but I love troubleshooting dgrid! I took a look at your code and didn't see anything amiss... but its hard to troubleshoot without the entire code context. When ColumnHider or ColumnResizer fail, it usually has to do with either the store or the column object itself being slightly malformed (even if it appears that everything is working correctly), thus the ids for each column are generated incorrectly, causing the extensions to fail. I would compare the store object to the column object and make sure nothing is strange about how the two structures relate to eachother. Could you potentially replicate this in a http://jsfiddle ? I have several other theories based on previous experiences with dynamic column structures but I'd like to inspect a live demo before going into more detail. Thank you!!
... View more
01-22-2014
12:02 PM
|
0
|
0
|
722
|
|
POST
|
Did some quick research and the dialog-create event was working for me.
IdentityManager.on('dialog-create', testFunction);
function testFunction(){
IdentityManager.dialog.txtUser_.set("value", "jon");
//dijit.byId("dijit_form_ValidationTextBox_0").set("value", "jon");
}
You can use either of these... the dialog object itself is referenced as a property of the IdentityManager object. Hope this helps... I suspect it may not be the penultimate solution but will wait to hear from you.
... View more
01-22-2014
09:36 AM
|
0
|
0
|
591
|
|
POST
|
Some objects cannot be recreated from json if certain construction params are not successfully saved in the json representation. You will want to recreate the symbol object in code from your db values. I believe you wanted to create your symbols from your db info correct? You needed to change my code slightly. See below:
function addAnnoLineHandler(evt) {
tb.deactivate();
map.enableMapNavigation();
var baseGraphic = new esri.Graphic( evt, annotationSymbol );
//map.graphics.add(baseGraphic); // adds graphic directly to map
var baseGraphicJson = baseGraphic.toJson();
var symbol = new esri.symbol.CartographicLineSymbol( baseGraphicJson.symbol );
var polyline = new esri.geometry.Polyline( baseGraphicJson.geometry );
var graphicFromDB = new esri.Graphic( polyline, symbol );
gLayer.add( graphicFromDB );
}
This worked for me. Why does this not work for you? Please be as specific as possible. Thanks!
... View more
01-22-2014
09:01 AM
|
0
|
0
|
1339
|
|
POST
|
In the future, if you are having jQuery issues, you may want to try asking your question here: http://gis.stackexchange.com/ or http://stackoverflow.com/ Glad to see you figured it out!
... View more
01-22-2014
08:30 AM
|
0
|
0
|
1304
|
|
POST
|
This is the wrong forum for this type of question as this doesn't concern the Esri JSAPI. It's more of a general DOJO or jQuery question. Using Google, I found this answer: http://stackoverflow.com/questions/2850314/jquery-dojo-how-do-i-use-jquery-with-dojo-toolkit
... View more
01-22-2014
08:25 AM
|
0
|
0
|
1304
|
|
POST
|
Agree with Jsim. His answer is correct. Using this sample: https://developers.arcgis.com/en/javascript/jssamples/graphics_add.html
function initToolbar() {
tb = new Draw(map);
esri.bundle.toolbars.draw.freehand = "new label";
tb.on("draw-end", addGraphic);
// event delegation so a click handler is not
// needed for each individual button
on(dom.byId("info"), "click", function(evt) {
if ( evt.target.id === "info" ) {
return;
}
var tool = evt.target.id.toLowerCase();
map.disableMapNavigation();
tb.activate(tool);
});
}
jsfiddle: http://jsfiddle.net/7KjX8/
... View more
01-22-2014
08:22 AM
|
0
|
0
|
1181
|
|
POST
|
Hi Matthew! Glad to see you are receiving solid help. As a front-end developer, may I recommend a few tools: If you use Firefox, you should look into using the Firebug extension. It's the most helpful tool I've ever used for front-end development, period. On the Chrome side, developer tools are built in and can be accessed via the shortcuts: Ctrl+shift+I or Ctrl+shift+J. Lastly, you can use http://www.jslint.com/ to clean up your code and check for syntax errors. You'll want to customize your options though... jslint is very very picky about certain things (as it should be!) Hope this helps!
... View more
01-22-2014
08:10 AM
|
1
|
0
|
5727
|
|
POST
|
Hi Patrick! Took a quick look and it seems your symbol object is getting distorted when using toJson(). You will want to recreate the symbol object in code from your db values. I would also use a polyline. Here's your addAnnoLineHandler() function slightly redone:
function addAnnoLineHandler(evt) {
tb.deactivate();
map.enableMapNavigation();
var symbol = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID,new dojo.Color("#000000"),2,esri.symbol.CartographicLineSymbol.CAP_ROUND,esri.symbol.CartographicLineSymbol.JOIN_MITER,1);
var baseGraphic = new esri.Graphic( evt, annotationSymbol );
//map.graphics.add(baseGraphic); // adds graphic directly to map
var baseGraphicJson = baseGraphic.toJson();
var polyline = new esri.geometry.Polyline( baseGraphicJson.geometry ); // note use of geometry property
console.log( 'polyline', polyline );
var graphicFromDB = new esri.Graphic( polyline, symbol );
console.log( 'graphicFromDB', graphicFromDB );
gLayer.add( graphicFromDB );
}
NOTE: If you end up using: tb.on("draw-complete", addAnnoLineHandler); over dojo.connect(tb, "onDrawEnd", addAnnoLineHandler); ... you will need to change addAnnoLineHandler() to accommodate, as 'evt' will no longer be what you expect.
... View more
01-22-2014
07:12 AM
|
0
|
0
|
1339
|
|
POST
|
Great! Glad everything is working. Make sure you mark this thread as answered (using one of Roberto's posts). Thanks!!
... View more
01-22-2014
05:15 AM
|
0
|
0
|
2576
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-26-2014 09:56 AM | |
| 1 | 09-18-2014 11:50 AM | |
| 1 | 09-19-2014 11:28 AM | |
| 1 | 07-09-2014 01:43 PM | |
| 1 | 07-09-2014 02:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-14-2024
05:31 PM
|