|
POST
|
What's the best way to add/remove basemaps without using the Gallery dijit? You could simply add a Tiled layer to the map using map.addLayer(tiledLayer), then remove it using map.removeLayer(tiledLayer).
... View more
08-07-2012
08:47 PM
|
0
|
0
|
1711
|
|
POST
|
for TOC i cant find any refresh method.... Hmmmm - I can't see anything, either. The author's contact details are included in the script - perhaps you could try asking him directly? Steve
... View more
08-06-2012
10:27 PM
|
0
|
0
|
684
|
|
POST
|
Is it possible to rebind or refresh agsjs.dijit.TOC and esri.dijit.Legend if i add an additional Service dynamically after loading the complete map page along with TOC and Legend..... You can detect when a layer is added to the map by listening for map.onLayerAdd(). You can then refresh the legend using legend.refresh(). The TOC probably has an equivalent refresh method. Steve
... View more
08-06-2012
08:52 PM
|
0
|
0
|
684
|
|
POST
|
Hi Connie, Have you followed all of the steps listed in the Working With Popups help file? Try installing Firefox and Firebug, which will allow you to inspect the CSS which is being used on the popup. Steve
... View more
08-06-2012
04:08 PM
|
0
|
0
|
1791
|
|
POST
|
I want to include a dynamic map layer in the layers.js that will always be the active layer for map click events to display attributes in an info window but not appear in the Layers Menu for turning its display on and off. (It will be totally transparent and I do not want the user to even know the layer exists.) Hi Bob, If the layer isn't being displayed, and is only being used for query purposes, then rather than adding an "invisible" layer a better method is not to add it to the Layers list. Instead, set up a new list for "query layers", which are those which should be queried when you click on the map (whether or not they are currently visible). Steve
... View more
08-05-2012
10:23 PM
|
0
|
0
|
998
|
|
POST
|
Hi David, Welcome to the forums! It'll be easier to get help if you can do a couple of things: - when you post a code sample, use the # option at the top right of the editor page. Otherwise, the formatting is stripped off, making the code much harder to read at a glance. - install Firefox and the Firebug debug tools. These will let you step through your running code, and pinpoint exactly where the problem lies. [LEFT]I'm thinking the problem has to do with either the proxy page reference (line 62-63) or the feature geometry reference (line 90). So you could try putting a breakpoint just before those lines (eg, break on the line "firstGraphic = graphics.features[0];" and ensure that you have a valid pointer to firstGraphic). Then step through your code, to see if that is indeed the error. Once you know that, it'll be a lot easier to debug, for everyone involved. Cheers, Steve[/LEFT]
... View more
08-05-2012
03:43 PM
|
0
|
0
|
785
|
|
POST
|
What do i put in the attribute section for new graphic.
var graphic = new esri.Graphic(geoPoint, symbol, attr, infoTemplate);
It doesn't look as though you've actually set attr (the list of attributes) so this will probably fail. See the graphic help entry for an example of how to specify the attributes: var attr = {"Xcoord":evt.mapPoint.x,"Ycoord":evt.mapPoint.y,"Plant":"Mesa Mint"}; You can also use "*" if you wish to use all attributes. Cheers, Steve
... View more
08-05-2012
03:04 PM
|
0
|
0
|
486
|
|
POST
|
Let me know if you have any questions about how ours works! Alan, Are you able to post a link to your site (or is it intranet only)? Perhaps some screenshots showing how it works on various devices? Thanks, Steve
... View more
08-02-2012
03:17 PM
|
0
|
0
|
1732
|
|
POST
|
Please disregard....problem solved. Can you post the resolution? This will help in the future if someone searches on the error message, and this forum post comes up.
... View more
08-01-2012
03:19 PM
|
0
|
0
|
1253
|
|
POST
|
my code always fails when calling the geometry service's buffer function.
geometryService.buffer(params, showBuffer);
I haven't stepped through your code, but are you sure that there's a showBuffer function (I can't see it in your extract)? This is what will run once the buffer operation is complete. If so, can you put a breakpoint on the first line of showBuffer and let us know what you see? According to the help file you should receive back an array of geometries. Steve
... View more
08-01-2012
03:16 PM
|
0
|
0
|
3119
|
|
POST
|
Hi Filda, See this sample for an example of how to do this.
//Tell the map to "listen" for mouse movements, and run the showCoordinates function
dojo.connect(map, "onLoad", function() {
//after map loads, connect to listen to mouse move & drag events
dojo.connect(map, "onMouseMove", showCoordinates);
dojo.connect(map, "onMouseDrag", showCoordinates);
});
function showCoordinates(evt) {
//get mapPoint from event
//The map is in web mercator - modify the map point to display the results in geographic
var mp = esri.geometry.webMercatorToGeographic(evt.mapPoint);
//display mouse coordinates
dojo.byId("info").innerHTML = mp.x + ", " + mp.y;
}
mp.x and mp.y show the coordinates - you can assign these to other variables and do whatever you like with them. This example puts them into a <span> on the page. Steve
... View more
08-01-2012
03:07 PM
|
0
|
0
|
1343
|
|
POST
|
Hi Dan, Have you followed the steps listed on the Working With Popups page? There may be something amiss with your CSS which is causing the title to appear twice. Can you post a link to the live page? Steve
... View more
08-01-2012
03:03 PM
|
0
|
0
|
3208
|
|
POST
|
Hi Harry, The code for the Identify button says: <a id="identifyButton" class="map_button identify left" onClick="JavaScript:activateImageQuery()... In this case, activateImageQuery is a function (not an ArcGIS command). You can find the function in the JS file at http://www.arcgis.com/showcase/javascript/main.js This function sets up the query which will run when you click on the map: queryImage.execute(query, dojo.hitch(this,showImageQueryFeatures, query)); When this query executes, it calls the function showImageQueryFeatures, which is sent the results of the query as a featureSet. The first feature in this set is then sent to the function showImageQueryFeature: function showImageQueryFeature(feature) { var attributes = { name: feature.attributes.NICE_NAME, nice_desc: feature.attributes.NICE_DESC, src_desc: feature.attributes.SRC_DESC, resolution: feature.attributes.SRC_RES, accuracy: feature.attributes.SRC_ACC, date: feature.attributes.SRC_DATE }; feature.setAttributes(attributes); feature.setInfoTemplate(queryImageTemplate); map.graphics.add(feature); } (the forum editor keeps messing up the code - the point is that it's retrieving the attributes from the feature) So basically, there is a polygon layer (invisible) sitting on top of the imagery, and this is what is being queried when you click on the map. Hope this helps, Steve
... View more
07-30-2012
05:28 PM
|
0
|
0
|
1176
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2014 08:45 PM | |
| 1 | 03-15-2011 04:23 PM | |
| 1 | 10-18-2019 12:50 AM | |
| 3 | 01-22-2019 02:33 PM | |
| 1 | 09-26-2011 10:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-20-2022
12:19 AM
|