|
POST
|
What about local storage or a cookie? This would require a user to log in once, but you could save the username for future logins on that device.
... View more
01-17-2014
05:58 AM
|
0
|
0
|
2251
|
|
POST
|
Hi Inoka, This is the forum for the Esri JSAPI, not the OpenLayer library. If you have an OpenLayer issue specifically, you should make a post over at http://gis.stackexchange.com/ As far as the proxy goes, you haven't given enough information to troubleshoot the issue. Which proxy are you using? What error messages are you seeing? Please give as much information as you can or it will not be possible to answer your question.
... View more
01-17-2014
05:52 AM
|
0
|
0
|
1293
|
|
POST
|
function addLegend(layerInfo) { var legendTb = new dijit.form.ToggleButton({ showLabel: true, label: i18n.tools.legend.label, title: i18n.tools.legend.title, checked: true, iconClass: 'esriLegendIcon', id: 'legendButton' }, dojo.create('div')); dojo.byId('webmap-toolbar-left').appendChild(legendTb.domNode); dojo.connect(legendTb, 'onClick', function () { navigateStack('legendPanel'); }); var legendCp = new dijit.layout.ContentPane({ title: i18n.tools.legend.title, selected: true, region: 'center', id: "legendPanel" }); dijit.byId('stackContainer').addChild(legendCp); dojo.addClass(dojo.byId('legendPanel'), 'panel_content'); var legendDijit = new agsjs.dijit.TOC({ map: map, layerInfos: layerInfo, collapsed: true, // slider: true }, dojo.create('div')); dojo.byId('legendPanel').appendChild(legendDijit.domNode); navigateStack('legendPanel'); if (dojo.isIE === 8) { setTimeout(function () { legendDijit.startup(); }, 100); } else { legendDijit.startup(); } }
Can anyone look into my code and see where I am committing mistakes Regards Ganesh Hi Genash, Can you recreate your issue using http://jsfiddle.net/ ? Also, remove the trailing comma:
var legendDijit = new agsjs.dijit.TOC({
map: map,
layerInfos: layerInfo,
collapsed: true,
// slider: true
}, dojo.create('div'));
var legendDijit = new agsjs.dijit.TOC({
map: map,
layerInfos: layerInfo,
collapsed: true
}, dojo.create('div'));
With that said, have you used any tools like jshint or jslint to clean up your code? They are incredibly powerful! *edit Looking at Nliu's documentation:
toc = new TOC({
map: map,
layerInfos: [{
layer: featLayer1,
title: "FeatureLayer1"
}, {
layer: dynaLayer1,
title: "DynamicMapServiceLayer1"
//collapsed: false,
// whether this root layer should be collapsed initially, default false.
//slider: false // whether to display a transparency slider.
}]
}, 'tocDiv');
I've never used Nliu's TOC widget but hope this helps. I found this from reading his documentation.
... View more
01-16-2014
12:32 PM
|
0
|
0
|
870
|
|
POST
|
Awesome, glad it works for you! Unfortunately, I am unable to answer your last question because I honestly have no idea. I have not yet used the snappingManager and am not familiar with its inner workings. However, I think it is safe to assume that there is a legitimate technical reason for having it this way... but again, I don't know what that reason is. If someone else could explain, that would be great! Lastly, make sure you mark this thread as 'answered' when you're completely satisfied 😃
... View more
01-15-2014
12:54 PM
|
0
|
0
|
1913
|
|
POST
|
Hi there, Map API Ref: https://developers.arcgis.com/en/javascript/jsapi/map-amd.html "If snapping is enabled on the map using map.enableSnapping() this property provides access to the SnappingManager." https://developers.arcgis.com/en/javascript/jsapi/snappingmanager-amd.html I'm not sure there's an init or load event for the SnappingManager but you could probably just make sure the SnappingManager is accessable/exists before continuing on in your code.
... View more
01-15-2014
12:09 PM
|
0
|
1
|
1913
|
|
POST
|
Hi Marco! This looks to be an OpenLayers issue and not an ESRI JSAPI issue. You may want to ask your question at http://gis.stackexchange.com/
... View more
01-15-2014
12:03 PM
|
0
|
0
|
1056
|
|
POST
|
Glad you found the answer! By the way, if you aren't seeing any error messages in the console (when there clearly is an error), you can wrap a try/catch around the problematic code.
try{
//code here
}catch(e){
console.log('error', e);
}
... View more
01-15-2014
07:48 AM
|
0
|
0
|
1676
|
|
POST
|
Thanks for all the responses! I tried update-end event but it is not getting called. dojo.connect(featureLayer, "update-end", function(evt) {...}); also tried extent-change event on map as below, but it is giving me total events... map.on("extent-change", function() {
//var len=Object.keys(featureLayer.toJson().featureSet.features).length;
//alert("hi="+len);
alert(featureLayer.graphics.length);
}); I am just trying to count the no. of attributes value of the layers drawn on a map and if we move the move then the layers on that map will change, so the count should also change. Thanks all for your help! I think it might be: dojo.connect(featureLayer, "onUpdateEnd", function(evt) {...}); or on(featureLayer, "update-end", function(evt) {...});
... View more
01-14-2014
07:56 AM
|
0
|
0
|
2865
|
|
POST
|
Inoka, it helps to be as informative as possible when asking for help here. What is the exact problem with this application? I assume you've read the proxy page here: https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html At what part are you having trouble? Please be as specific and verbose as possible. Thanks!
... View more
01-14-2014
07:03 AM
|
0
|
0
|
1293
|
|
POST
|
Sunitha, make sure you mark the thread as 'answered' (via the appropriate post) so that in the future, other people with a similar question can find the answer.
... View more
01-14-2014
06:59 AM
|
0
|
0
|
2598
|
|
POST
|
Odoe has a cool print widget you may be able to get ideas from: https://github.com/odoe/esri-print-widget Maybe related: http://gis.stackexchange.com/questions/58008/printtask-in-arcgis-online-js-api
... View more
01-14-2014
06:57 AM
|
0
|
0
|
1676
|
|
POST
|
Is there a specific technical reason you need to use a spatial reference of 25831 for your application (E.G. not 4326 or 102100)?
... View more
01-14-2014
06:51 AM
|
0
|
0
|
1280
|
|
POST
|
In the documentation you linked, you'll notice that applyEdits returns a deferred. Edit your code to handle the deferred... try something like this: myLayer.applyEdits(null, [updateFeature], null).then(function(addResponse, updateResponse, deleteResponse){ console.log(addResponse, updateResponse, deleteResponse); }); NOTE: Only updateResponse will have data (since you did not add or delete, both addResponse and deleteResponse will be null). *edit I also want to mention that you linked to the old style (legacy) documentation of FeatureLayer. I would recommend switching over to AMD style.
... View more
01-14-2014
06:42 AM
|
0
|
0
|
1399
|
|
POST
|
The Lee Council has created a toggle button with click event and which slides in & out the accordion container. Have you checked the sample web application link. Are they using expandopane method. I don't think so. Did you also check the sample? They are using dojo.animateProperty() Like Jian said, there are many many ways to accomplish what you desire. The choice really comes down to you making your own decision based on your immediate needs. As a developer, the best thing you can do is outline the needs/wants/requirements of a project before starting to code.
... View more
01-14-2014
06:38 AM
|
0
|
0
|
450
|
|
POST
|
Confirming the issue still exists in the modified sample (Firefox). Like before, the graphic appears after zooming in/out. Not sure why; there's no apparent consistancy as to when a graphic displays or not. Going to look into it.
... View more
01-10-2014
10:21 AM
|
0
|
0
|
1636
|
| 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
|