|
POST
|
I've been developing under the 2.8 API and my app has loaded immediately but, under the 3.3 API, it's exhibiting a weird lag time. One of my featureLayers is constructed on the fly using a FeatureCollection. Using some well placed console.log commands, I can see that the code is, in fact, running immediately (including processing the deferred results which are used to construct the featureCollection). The problem is that those features are NOT visible or clickable for another 4 minutes! After that 4 minutes, the features suddenly appear and everything is fine. There's no error to speak of in the console and, again, it runs fine in v2.8 We're using ArcGIS Server 10.1. This app is currently running on an internal, developmental server but I'm hoping to push a public version soon (I have some other issues I need help with). Has anyone else experienced weirdness like this with the 3.3 API? Steve
... View more
01-25-2013
09:50 AM
|
0
|
12
|
3682
|
|
POST
|
ESRI's basemaps use the Web Mercator projection so you'll need to convert the lat/longs using the geographicToWebMercator function.
... View more
01-25-2013
09:14 AM
|
0
|
0
|
1115
|
|
POST
|
Try using a function outside of the dojo.connect code block instead of an inline function? Maybe the code is "running over" the deferred part. I've had this happen to me with other aspects of using the javascript API. At any rate, I'm using this technique in the apps I'm working on and it works for me. [EDIT] Noticed that you're using popup templates. My example and my background has been with infoTemplates so I don't know if that's making any difference..
... View more
01-25-2013
08:28 AM
|
0
|
0
|
3576
|
|
POST
|
I'm just wondering out loud here but would "graphic.attributes " also work (where x=column number of desired attribute field)?
... View more
01-25-2013
07:49 AM
|
0
|
0
|
1102
|
|
POST
|
It certainly is possible. First, you'll need to define infoTemplates for each feature layer: var template1 = new esri.InfoTemplate();
template1.setContent(SetFeatureLayer1PopupInfo); //call function to set the content
template1.setTitle('Some generic title or another function');
var template2 = new esri.InfoTemplate();
template2.setContent(SetFeatureLayer2PopupInfo); //call function to set the content
template2.setTitle('Some generic title or another function'); Now, when you create your feature layers, you just choose the appropriate infoTemplate and then do the dojo.connect as usual: theFeatureLayer1 = new esri.layers.FeatureLayer("REST Url", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate: template1,
outFields: ["*"],
visible: true
});
theFeatureLayer2 = new esri.layers.FeatureLayer("REST Url", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate: template2,
outFields: ["*"],
visible: true
});
dojo.connect(theFeatureLayer1, "onClick", function(evt) {
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,10);
var deferred = theFeatureLayer1.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.resize(550,350);
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(evt.mapPoint);
}); Later in your code will be the function to create the popup content: function SetFeatureLayer1PopupInfo(graphic) {
fullAttr = graphic.attributes;
someval = fullAttr.FIELDNAME;
content = '<table><tr><td>Field Name:</td><td>' + someval + '</td><tr></table>';
return content;
}
... View more
01-25-2013
07:39 AM
|
0
|
0
|
3576
|
|
POST
|
Jeff, We just did the registration process with ArcGIS Server like you mentioned and it finally looks like it's updating. Marked as answered. Moderators- Feel free to move this thread as Jeff suggested.
... View more
01-11-2013
12:44 PM
|
0
|
0
|
922
|
|
POST
|
This issue is driving me CRAZY and I'm at a lost to explain it, let alone know how to correct it. I'm developing a web map which will report back stream gage heights. That data is stored natively in an Access database but I have a python script which does a bulk extract every 5 minutes and then transfers the records into a standalone table in SDE. The data has an Epoch timestamp so I can confirm that the data inside the standalone table is current. One of the map requirements was that the gages on our map were symbolized by color based on their current flood stage. To facilitate this, I build the layer on the fly as a FeatureLayer using a FeatureCollection whose source is the standalone table previously mentioned. Last bit of context is that the standalone table is a layer tucked within a published map service with two other point datasets. My system was working fine when we still were running ArcGIS Server 10 but since we upgraded to 10.1, my mapped information is stale. At first, I thought the issue might be that the standalone table consistently has over 2,000 records and the map service had a MaxRecordCount of 1,000. We bumped that up to 5,000 for the map service but the individual layer still shows a MaxRecordCount of 1,000 when viewing its properties in the REST services directory. Through some testing, I think I can say that this is not the problem. I performed a query using "1=1" and it returned the 2,000+ records. So I'm left with a situation where my data is just "stale." I'm not responsible for the installation/maintenance of our ArcGIS Server but the person who is told me that one of the changes from 10 to 10.1 is that Server now pulls data locally onto the server. I'm starting to wonder if my app just keeps pointing back to a cached copy of the table's records?? My app has briefly worked twice under 10.1 and both times were immediately after deleting and re-adding the map service that includes the table. This behavior is what leads me to think that I'm a victim of cached data. How can I remedy this??? The app is still in development and not on the public side of our firewall, unfortunately. Steve
... View more
01-11-2013
08:13 AM
|
0
|
2
|
1309
|
|
POST
|
Trying to utilize the TableDataSource but I have no clue what the WorkspaceID is and where it can be found. The help docs don't have much to say about it. I'm trying to access a standalone table located in v10 SDE. Is it simply the name of the SDE database?? Thanks- Steve
... View more
01-10-2013
12:49 PM
|
0
|
2
|
1236
|
|
POST
|
Elena- Did you ever solve your problem? I'm now facing the same thing- my map service has the 5,000 feature limit set but a layer within the service I REALLY need still shows 1,000. Steve
... View more
01-10-2013
08:12 AM
|
0
|
0
|
1958
|
|
POST
|
Cool- I'm glad you've got things going. Regarding the alignment, you can add some CSS aligning options in the style="" portion of the HTML code I suggested for which ever part of the HTML table needs it (table header (TH), table row (TR), table data (TD)): text-align: <left|center|right> If you also need to tweak the vertical alignment, add one of these CSS options as well: vertical-align: <top|center|bottom> HTML Tables have an ALIGN and VALIGN option but it's been depreciated in favor of the CSS formatting tags. These old options will work unless you're working with HTML 5. W3 HTML TD Tag Reference
... View more
01-07-2013
06:12 AM
|
0
|
0
|
2337
|
|
POST
|
I would follow the approach you have so far with just a couple tweaks. Here's my two cents: Use your printIt function but pass the datagrid object instead of it's innerHtml Inside of the function, loop through the rows in your dataGrid and then add rows to an HTML table I can't guarantee this code works since I'm not at work and don't have access to my own datagrid related code but hopefully you can see what I'm thinking: function printIt(myGrid)
{
var win = window.open();
self.focus();
win.document.open();
win.document.write('<'+'html'+'><'+'head'+'><'+'style'+'>');
win.document.write('body, td { font-family: Verdana; font-size: 12pt;}');
win.document.write('<'+'/'+'style'+'><'+'/'+'head'+'><'+'body'+'>');
win.document.write('<table style=\"width:100%\"><th style=\"font-weight:bold\">Facility</th><th style=\"font-weight:bold\">Address</th><th style=\"font-weight:bold\">City</th><th style=\"font-weight:bold\">Phone</th>');
myGrid.store.fetch({
onComplete: function (items) {
dojo.forEach(items, function (item, index) { ...
win.document.write('<tr><td>' + item.FACILITY + '</td><td>' + item.ADDRESS + '</td><td>' + item.CITY + '</td><td>' + item.PHONE + '</td></tr>');
})
}
});
win.document.write('</table>');
win.document.write('<'+'/'+'body'+'><'+'/'+'html'+'>');
win.document.close();
win.print();
win.close();
}
... View more
01-04-2013
04:33 PM
|
0
|
0
|
2337
|
|
POST
|
Hi Chris, Glad the code helped you! I'm currently on vacation until next week so I can't try anything but I don't have quick answer for you right now. I remember wanting to change the background color of the tooltip as well without success. I'll try to look at it again next week but, for now, you might want to try an inspect the Dojo CSS. You might have to override the default CSS with "!important" in your own CSS file. Maybe that's why specifying via javascript object properties isn't working?...
... View more
01-04-2013
11:45 AM
|
0
|
0
|
4198
|
|
POST
|
Does this thread answer your question? It uses esri.graphicsExtent() based on the selected featureset
... View more
01-03-2013
05:29 PM
|
0
|
0
|
696
|
|
POST
|
Hi Kelly, Yes- you are correct- it is a layer based on a feature collection. I missed that note in the API reference. So do I have any other options for querying my layer besides objectId? In my app, the feature collection gets replaced every 5 minutes after a new query to a database so I don't think I can use objectIDs as a viable query tool. I only have 8-12 features (they're stream gages) so I can just loop through the features but I'm just curious what to do if your feature collection has a lot more features in it. Thanks! Steve
... View more
12-22-2012
06:49 PM
|
0
|
0
|
706
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | a month ago | |
| 1 | 03-12-2026 01:43 PM | |
| 1 | 03-12-2026 08:41 AM | |
| 2 | 03-10-2026 10:10 AM | |
| 1 | 02-18-2026 09:20 AM |