|
POST
|
Below is the original code from the sample "dijit/layout/ContentPane"],
function(dom, domAttr, array, Color, parser, esriConfig, Map, Graphic, GeometryService, BufferParameters, Draw, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol){
var map, gsvc, tb;
parser.parse();
map = new Map("map", {
basemap: "streets",
center: [-75.72, 39.96],
zoom: 10
});
map.on("load", initToolbar);
I added a line of code to declare the var basemap and another line of code to add the basemap. I then changed the basemap variable from streets to my new basemap variable "dijit/layout/ContentPane"],
function(dom, domAttr, array, Color, parser, esriConfig, Map, Graphic, GeometryService, BufferParameters, Draw, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol){
var map, gsvc, tb;
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("https://myServerLink/MapServer", { useMapImage: true, "id": "Basemap" });
map.addLayer(basemap);
parser.parse();
map = new Map("map", {
basemap: "basemap",
center: [-75.72, 39.96],
zoom: 10
});
map.on("load", initToolbar);
But now no map shows up. Can anyone tell me what I am doing wrong in the modification of this sample? I also changed the opening extents of the map so it would be centered on my basemap service. Hi Michael, You will only be able to use the 'basemap' option with the map class when you are specifying a valid option (i.e. 'topo', 'streets', etc). See the link here. You are on the right track by using the ArcGISTiledMapServiceLayer class. When you use a new class, you will need to reference the module. Take a look at the tutorial here. Also, be sure you are referencing the AMD module and not the Legacy module. Also, here is a jsfiddle example of adding a tiled service using the ArcGISTiledMapServiceLayer class.
... View more
03-21-2014
03:08 AM
|
0
|
0
|
2181
|
|
POST
|
Rene: I'm not familiar with adding a basemap. Is that short-hand syntax that can be used only for ESRI's basemaps? If I have my own mapservice(s), how would I add them as a basemap like this example did for ESRI's basemap? You will want to use the ArcGISTiledMapServiceLayer class.
... View more
03-20-2014
11:29 AM
|
0
|
0
|
2181
|
|
POST
|
Hi Michael, Jamie is correct that this sample does not have a map service. The application is buffering the drawn graphic. The geometry is passed once the graphic is finished drawing: function initToolbar(evtObj) {
app.tb = new Draw(evtObj.map);
app.tb.on("draw-end", doBuffer);
} See more about the 'draw-end' event here. You will see the returned property is geometry. This is then passed to the 'doBuffer()' function.
... View more
03-20-2014
11:27 AM
|
0
|
0
|
2181
|
|
POST
|
Hi Michelle, You may be running into a bug, NIM084485. Synopsis In the Land Use Public Notification local government template, there are improperly defined workspaces in the GenerateCSV and GenerateAveryLabelsPDF tools in PublicNotification.tbx. Additional Status Information Fixed in the November 2012 Release Alternate Solution Edit the script tools to be published as geoprocessing services for the Land Use Public Notification local government template to use the %scratchfolder% environment.
... View more
03-20-2014
10:29 AM
|
0
|
0
|
1784
|
|
POST
|
Hi Jamie, Take a look at using the TextSymbol class. Here is an example.
... View more
03-19-2014
12:23 PM
|
0
|
0
|
736
|
|
POST
|
Cannot say for sure; it looks like this may be a bug.
... View more
03-19-2014
11:29 AM
|
0
|
0
|
3523
|
|
POST
|
Hi Michael, You will just need to update the outFC variable. Ex: outFC = r'C:\Project\Bookmarks.shp'
... View more
03-19-2014
10:53 AM
|
0
|
0
|
3523
|
|
POST
|
You can access it using the REST URL. To get the URL, you can go to Start > Programs > ArcGIS > ArcGIS for Server > Services Directory. Click on 'Utilities' > 'Utilities Geometry'. You should have a URL similar to: 'http://localhost:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer'
... View more
03-19-2014
10:49 AM
|
0
|
0
|
1166
|
|
POST
|
Hi Sherrill, Do you have ArcGIS Server? If so, you will have your own geometry service that you can use.
... View more
03-19-2014
10:30 AM
|
0
|
0
|
1166
|
|
POST
|
Hi Jennifer, I would recommend rebuilding all of the overviews to see if this fixes the issue. To do so, right-click on the mosaic dataset in the catalog window > Optimize > Build Overviews. Uncheck the last two options to rebuild all overviews. Ex: [ATTACH=CONFIG]32331[/ATTACH]
... View more
03-19-2014
09:46 AM
|
0
|
0
|
3667
|
|
POST
|
Hi Deepika, Here is an example using a feature layer and exporting to a shapefile through a button added to the info window. The export is handled through a geoprocessing service. Note: it will take about 30-60 seconds for the zipped shapefile to be returned
... View more
03-19-2014
06:10 AM
|
0
|
1
|
1938
|
|
POST
|
Hi Arfa, You can use the MessageBox function. See the following link: http://resources.arcgis.com/en/help/main/10.2/index.html#/The_pythonaddins_module/014p00000021000000/ Ex: pythonaddins.MessageBox('Test Message', 'INFO', 0)
... View more
03-18-2014
11:28 AM
|
0
|
0
|
2208
|
|
POST
|
Try the following: function selectInBuffer(response){ var feature; var features = response.features; var inBuffer = []; for (var i = 0; i < features.length; i++) { feature = features; if(polygon.contains(feature.geometry)){ inBuffer.push(feature.attributes[featureLayer.objectIdField]); } } var query = new Query(); query.objectIds = inBuffer; featureLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function(features, index){ for(var i = 0; i < features.length; i++){ alert(features.geometry.x + ", " + features.geometry.y) } }) }
... View more
03-18-2014
04:52 AM
|
0
|
0
|
3365
|
|
POST
|
Yes, it's possible. How are you selecting which point you want the coordinates for? How do you want the coordinates returned (i.e. alert, dgrid)?
... View more
03-18-2014
03:31 AM
|
0
|
0
|
3365
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Online
|
| Date Last Visited |
Tuesday
|