|
POST
|
Hi Heming, Your example helped me figure out most of the styling for my grid except for the header. I have tried multiple ways to remove the shiny silver skin on top of my header but have been unsuccessful. I tried th#gridHdr0{} and th#gridHdr1{} to set thier background-color property. It works but shows these colors behind the silver skin. Any suggestions to remove the skin? Is it possible this skin might e part of another div element? Thanks Samir It should not be any different from styling a normal table th. There are so many properties for th css. You might have to look at these properties to decide what is the cause.
... View more
11-04-2011
12:06 PM
|
0
|
0
|
3049
|
|
POST
|
Hi I need help with writing a script: The task I have a point feature class of graffiti incidents and a polygon feature class of patrol zones with some empty attributes already created for you. I must write a script that updates the attributes of the patrol zones with: �?� The number of graffiti incidents falling within the patrol zone. This is an integer that goes in the INCIDENTS field. �?� The priority ranking for the patrol zone. This is a string that goes in the PRIORITY field. You will derive this string using some simple math that compares the number of incidents in the zone with the area of the zone. Patrol zone priority rankings I then will calculate a priority ranking for each zone by dividing the number of graffiti incidents in the zone by the area of the zone. My script should then examine the result and assign the appropriate priority ranking (PRIORITY). These are the priority rankings: �?� TOP CONCERN�??15 or more incidents per square mile �?� HIGH CONCERN�?? At least 12 but less than 15 incidents per square mile �?� SOME CONCERN�?? At least 6 but less than 12 incidents per square mile �?� LOW CONCERN�??Fewer than 6 incidents per square mile Here's what I have so far: import arcpy arcpy.env.overwriteOutput= True # layer that we are changing patrolZone= "C:\\...\\PoliceData.gdb\\PatrolZones" # the layer we are selecting from graffiti= "C:\\...\\PoliceData.gdb\\GraffitiIncidents" nameField= "NAME" graffitiField= "OBJECTID" incidentsField= "INCIDENTS" # sits above the first row, starts the cursor patrolRows= arcpy.UpdateCursor(patrolZone) # tells it to go to the first row patrol= patrolRows.next() # now were in the first row doing looping while patrol: arcpy.MakeFeatureLayer_management(graffiti, "GraffitiLayer") zones= patrol.getValue(nameField) #print incidents queryString = '"' + str(nameField) + '" = ' + "'" + str(zones) + "'" print str(queryString) arcpy.MakeFeatureLayer_management(patrolZone, "PatrolLayer", queryString) arcpy.SelectLayerByLocation_management("GraffitiLayer", "CONTAINED_BY", "PatrolLayer") numGraffiti= arcpy.GetCount_management("GraffitiLayer") print numGraffiti patrol= patrolRows.next() I would appreciate any help!! Use SpatialJoin_analysis (target_features, join_features, out_feature_class, {join_operation}, {join_type}, {field_mapping}, {match_option}, {search_radius}, {distance_field_name}). target_features will by your polygon feature class. join_features will be your point feature class. {match_option} will be CONTAINS, in your case, means patrolZone contains graffiti incidents. The result feature classs will have a field Join_Count which indicates how many join features match each target feature, in your case, means how many graffiti incidents in each patrolZone. Then you can use CalculateField_management: count/SHAPE.area...
... View more
11-04-2011
11:39 AM
|
0
|
0
|
722
|
|
POST
|
hi, I am doing a buffer query this piece of code is zooming into the feature. if (featholding.length > 0 && featholding.length == parnums.length - 1) {
map.setExtent(esri.graphicsExtent(featholding[0].features),true);
} I would like to change the extent a bit so the end user can see more of the area surrounding this feature. How would I go about changing the extent to do this? Thanks map.setExtent(esri.graphicsExtent(featholding[0].features).expand(1.2),true);
... View more
11-04-2011
07:49 AM
|
0
|
0
|
535
|
|
POST
|
Cheers - but this isn't consistent, for example .visibleLayers returns the visible discrete datalayers within a ArcGISDynamicMapServiceLayer So I'm still confused! Maybe they should use a better term...
... View more
11-04-2011
04:54 AM
|
0
|
0
|
1194
|
|
POST
|
I know how to remove the ESRI standard logo
map = new esri.Map("map", {
extent: initExtent,
logo:false
});
But what about if I want to add my own logo...Can someone show me how to do that? Thanks Nathalie http://forums.arcgis.com/threads/41800-Replace-ESRI-logo-with-custom-logo
... View more
11-04-2011
04:48 AM
|
0
|
0
|
417
|
|
POST
|
OK on the desktop this is simple, a layer is a discrete data set, a shapefile, a layer in a geodatabase or something. However it seems to me to have two usages for the Javascript API. Take this from http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm "This sample shows how to use the Legend widget to build a legend that displays swatches and labels for the layers in the map.................The legend is displayed in one pane of the accordion container and a link that allows you to toggle the visibility of layers in the map is displayed in the other" In the instance of "layers" this refers to the discrete datasets on the map, in this example, Campgrounds, Shelters, Earthquakes etc, and refers to the legend items for each of these "layers" The second instance refers to map services added by "map.addLayers" and will give a tick box per map service - which could contain shed loads of, what I would call, "layers" Have I missed something here? ACM Layer in JS API refers to a map services(.mxd/.msd) the runs at the ArcGIS server, except that you can define a certain layer in a map service as stand alone featurelayer.
... View more
11-04-2011
04:43 AM
|
0
|
0
|
1194
|
|
POST
|
Thanks, but in my case, I have multiple layers. This way I can only change the extent of the base layer. But my features are on another layer. (Both served in one map service though). How can I handle this scenario? Extent.union(extent).
... View more
11-04-2011
04:37 AM
|
0
|
0
|
649
|
|
POST
|
Thank you FF: size has changed, scrollbar is still visible. IE 8: width has changed, height - not, both scrollbars are visible. More suggestions?? looks like overflow: hidden has no impact on .templatePicker style.
... View more
11-03-2011
09:27 AM
|
0
|
0
|
934
|
|
POST
|
I am using ArcGIS 9.3. When I perform a search and draw the returned features on the map, I need it to be zoomed to the maximum possible extent that includes all features. Is this possible? Any examples appreciated. map.extent =esri.graphicsExtent(featureSet.features).
... View more
11-03-2011
05:01 AM
|
0
|
0
|
649
|
|
POST
|
Hi! Who is know how to adjust esri.dijit.editing.Editor size and remove scrollbars? Thanks! Use editor's div id. something like this: #editorDivID { width:100px; height:100px; overflow:hidden; }
... View more
11-03-2011
04:59 AM
|
0
|
0
|
934
|
|
POST
|
Thanks for the reply hzhu, I think what you mean is that the reason the two layers do not overlay on top of each other correctly is that they are on different projection systems. (My data is on Transverse Mercator (actually it is UTM, but for some reason ESRI has always called UTM simply Transverse Mercator) and the data in the Service is on "Web Mercator"). But if this is the case then it brings up two questions: 1) Why do the two services overlay perfectly fine if I do not specify an extent (as in the first link I showed)? 2) Why do I need to have the two layers on the same projection system? ArcMap will reproject data on the fly if they are on different projection systems. Evidently from the examples I have posted so does ArcGIS Server but it does not work when a new extent is specified? For your first question: JS API did transformation automatically for you just like arcmap did for layers with different extent. For your second question: You don't need to have your data on the same as ESRI base maps, but if you want to use the initial extent of your data which is not in WebMercator then problem will rise because the extent will have wrong value. That is why i said you could change data frame to WebMercator to get the right extent( write down these numbers, hard code in your app, and then reset your data frame back to your SR -if you like).
... View more
10-31-2011
12:30 PM
|
0
|
0
|
817
|
|
POST
|
I am trying to put two layers in the map. One layer is my own data served from our ArcGIS Server instance, the other one is the ESRI world street basemap layer. The two layers overlay on top of each other perfect (i.e. my data appears over the street map exactly where it is supposed to): http://www.northmiamicra.org/testjsapi.html However, when I try to set the initial extent of the map to be the initial extent of my own data (North Miami, Florida), it does zoom to the initial extent of my data, but for some reason it overlays it with the World Street Map in Nigeria! Why is this happening? http://www.northmiamicra.org/test2layers.html FYI, the code in the second link is virtually identical to the sample code found here: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_setextent.html The only thing I changed in the sample code was that I removed the geographicToWebMercator function because my data is already in Transverse Mercator. Transverse Mercator and WebMercator are two different projections. So the initial extent of your data would not be in WebMercator units. You could either change SR of your .mxd data frame to WebMercator, or do somekind of transformation of your initial extent (GeometryService.project, hard code your initial extent in WebMercator units etc).
... View more
10-31-2011
11:41 AM
|
0
|
0
|
817
|
|
POST
|
Hi Heming, I tried unsuccessfully to override tundra.css for my dojo grid. Can you point me to some examples where I can learn to do this? Thanks Samir add this to the following esri sample .dojoxGrid th{ border-bottom: navy solid thin !important; border-top: navy solid thin !important; border-left: none!important; border-right: none!important; font-size: smaller!important; } http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_map_datagrid.html
... View more
10-31-2011
08:09 AM
|
0
|
0
|
3049
|
|
POST
|
Hello, I have a problem with V2.5 of the JS API (although seems to be the same for previous versions). The problem is editing and entering a date attribute which then gets saved to the database with a date one day into the past. I have seen some similar forum posts about this, but not relating to the JS API, and not specifically like my problem �?? I will attempt to describe below. Layers come from SDE V10, SP1 and some have date fields. Using the out the box template picker and editor dijits (so no custom code) a user can place a point on the map and the attribute info window pops up and they can pick a date from the date picker. If they pick today's date, or a date into the future then that date gets saved correctly into the database. HOWEVER, if they pick a date in the past, then the date gets saved to the database one day further into the past. For example a user selects 31/10/2011 in the date picker (and the current date is the same 31/10/2011) then this saves as you would expect as 31/10/2011 into the database, if they select 30/10/2011 (yesterday), this gets saved as 29/10/2011 in the database. What's also interesting is that the value in the database is 29/10/2011, but when the user edits the point attributes using the info window, the displayed date is 30/10/2011. This must have something to do with the info window attribute editor code, but as this is out of my control I don't know how to fix this problem. It is very strange that only past dates exhibit this problem. This is an issue because I want to store correct dates in the database of course. I'm in the UK by the way which might have a bearing. Can anyone please help solve this puzzle? Thank you, Mark. Enable time on the layer in you .mxd/.msd. Setting up the time zone to your time zone.
... View more
10-31-2011
05:20 AM
|
0
|
0
|
936
|
|
POST
|
hi right now I have this code zooming to this feature if (featholding.length > 0) {
map.setExtent(esri.graphicsExtent(featholding[0].features));
} I have a buffer query on the map and would like to map to focues on this but not zoom in as close as it currently ls map.setExtent(esri.graphicsExtent(featholding[0].features), true);
... View more
10-28-2011
11:30 AM
|
0
|
0
|
385
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-11-2011 12:16 PM | |
| 1 | 05-25-2017 08:26 AM | |
| 1 | 06-02-2017 07:37 AM | |
| 1 | 06-28-2011 07:02 AM | |
| 1 | 06-12-2017 10:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-01-2024
09:57 PM
|