|
POST
|
The reference for SimpleMarkerSymbol only lists circles, squares, etc so it may be a limitation of symbolising a feature layer? As a workaround, can you make an image of the "M" and use a PictureMarkerSymbol? Note that I haven't tried this so it's just a guess (based on the idea that symbolising a feature layer is probably using the same mechanisms as symbolising a graphics layer).
... View more
06-21-2011
04:39 PM
|
0
|
0
|
842
|
|
POST
|
Hi Joseph, Great question. (To make it easier to answer on these forums, it helps if you can put the URLs of the samples you're referencing. As far as I can tell, you're talking about the samples at http://www.arcgis.com/home/item.html?id=59e7183e19e743f4810a01a7384ac68a and http://www.arcgis.com/home/item.html?id=d8b5cd47ecfe47489548714502eb7969) On the Notification map, they are reading in the text for the popup using the syntax below. I'm not familiar with this myself, so hopefully someone more experienced can explain how it works. Here's the relevant code from the default.htm page: //Function to initialize the map and read data from Configuration file
function Init() {
ShowLoadingMessage('Loading...');
esri.config.defaults.io.proxyUrl = "proxy.ashx";
esri.config.defaults.io.alwaysUseProxy = false;
esri.config.defaults.io.timeout = 600000; //timeout for querytask
dojo.xhrGet({
url: "Config.txt",
handleAs: "json",
preventCache: true,
load: function (responseObject, ioArgs) {
dojo.byId('divLoadMessage').innerHTML = responseObject.SplashScreenMessage;
dijit.byId('dialogLoadMessage').show();
If you're happy to hard-code the message, you could simply use the last two lines of the code above, inserting your own variable for SplashScreenMessage.
var myMessage = "welcome blurb for your site";
dojo.byId('divLoadMessage').innerHTML = myMessage;
dijit.byId('dialogLoadMessage').show();
You also need to add the relevant DIVs to your page, as seen towards the end of the default.htm page: <div id="dialogLoadMessage" dojotype="dijit.Dialog" style="width: 350px;">
<table>
<tr>
<td>
<div id="divLoadMessage" style="background: black; color: White;">
</div>
</td>
</tr>
<tr>
<td align="center">
<div class="divOk" onclick="dijit.byId('dialogLoadMessage').hide();">
OK</div>
</td>
</tr>
</table>
</div>
They are also slightly dimming the map while the dialog is open. I can't see how they're doing it after a quick glance, but there are plenty of simple ways to do it using jQuery, as in this sample.
... View more
06-20-2011
04:11 PM
|
0
|
0
|
1337
|
|
POST
|
Hi Georgie, Can you define the layers as Feature Layers? This will potentially make it easier to display the infoWindows on hover, as you won't need to go through the rigmarole with the graphics. One of the parameters of the featureLayer is the infoTemplate, so you would define the infoTemplate's contents (the attributes for Route1, the URL for Route4) and apply it to the layer. Then set a listener for the onMouseOver event of each layer, to display the infoWindow on hover. The pseudo-code would be: - define a new infoTemplate - set the infoTemplate's content - define route1FeatureLayer as a new featureLayer, referencing the infoTemplate - set a listener to display the infoTemplate on mouse-over - repeat for Route4 The sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_ondemand.html shows how to define the infoTemplate for a featureLayer, and the sample you referenced shows the onMouseOver syntax, which will apply to the featureLayer too: dojo.connect(route1FeatureLayer, "onMouseOver", function(evt) {
... View more
06-19-2011
11:24 PM
|
0
|
0
|
739
|
|
POST
|
Scott, your link isn't working for me. It's failing with a 404 for the address http://serverapi.arcgisonline.com/jsapi/arcgis/2.3/js/dojo/dojo/nls/_en-gb.xd.js Does the client need to do/install anything for this to work?
... View more
06-19-2011
08:59 PM
|
0
|
0
|
6443
|
|
POST
|
Try setting the maxAllowableOffset parameter on the query, to reduce the size of the returned geometry: var query = new esri.tasks.Query();
query.returnGeometry = true;
query.maxAllowableOffset = 1000; There's a sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_generalize.html which explains how to do this for a feature layer - it's the same principle for the query, so you could set the offset as a factor of the current extent. This should improve the performance in any browser, incidentally.
... View more
06-19-2011
08:49 PM
|
0
|
0
|
763
|
|
POST
|
I'm seeing this too (eg at http://atlas.nsw.gov.au/public/nsw/home/map/population.html) I've always assumed it's something to do with VML vs SVG rendering of features, but it'd be great to get an official reason, and any tips for avoiding it.
... View more
06-19-2011
08:25 PM
|
0
|
0
|
860
|
|
POST
|
I can't see any clear documentation on the best option for printing a map using the JavaScript API 2.3. http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2009/07/27/ArcGIS-JavaScript-API-printing-through-PDF.aspx mentions a developer Map2PDF sample, but the hyperlink doesn't work. http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2011/04/12/An-introduction-to-arcpy.mapping-for-ArcGIS-Server-developers.aspx mentions using an arcpy geoprocessing service. Is this the best option? At the Dev Summit I vaguely remember hearing that printing will be much better in ArcGIS Server 10.1 and that the printed maps will support red-lining/graphics. Can someone please point me to documentation on this? Will this supersede the options above? Thanks, Steve
... View more
06-13-2011
06:14 PM
|
0
|
1
|
725
|
|
POST
|
Using the JavaScript API, is there an ability for the user to upload a local dataset? Eg a shapefile or personal geodatabase on the user's PC. A user is asking for this, but I haven't seen this in any samples, including ArcGIS.com. The "drag and drop" sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/exp_dragdrop.html shows this working with images and CSV files. Is this a possible avenue for loading shapefiles? Thanks, Steve
... View more
06-13-2011
05:58 PM
|
0
|
2
|
2234
|
|
POST
|
My work around i think should be to have the infoWindow display when a user double clicks. FWIW, I think this could cause problems with user expectations, as it's a "standard" feature to zoom the map in on double-click. The problem is that if I click the measure widgit and then click the map, it not only starts measureing, but it also displayes the infoWindow. You could disable the infoWindow listener when the user clicks the measure widget, and re-enable it when the measure widget is closed. One option is to do something like this: var clickListener = dojo.connect(map, "onClick", myClickHandler);
dojo.disconnect(clickListener); Good luck, Steve
... View more
06-09-2011
07:40 PM
|
0
|
0
|
1373
|
|
POST
|
Hi Angie, query.where = "SPECIES_CODE = " + globals.speciesID +" and YEAR = " + globals.year; query.timeExtent = globals.map.timeExtent; function timeSliderChanged(timeExtent) { globals.year = timeExtent.endTime.getUTCFullYear(); } Are you sure you need to store the year in a variable, and use this in the query.where statement? If the layer is time-aware, then the query's time extent (query.timeExtent = map.timeExtent) should take care of this for you. Can you put a break-point inside the timeSliderChanged function, and verify that globals.year is being set correctly? They put another break-point inside the query and ensure that query.where is correct? This may help you to debug what's going wrong. Steve
... View more
06-08-2011
04:27 PM
|
0
|
0
|
704
|
|
POST
|
thanks for the info. I'll just redirect them to http://www.ie6nomore.com/ 🙂
... View more
06-07-2011
03:08 PM
|
0
|
0
|
585
|
|
POST
|
Hi John, It sounds like the geodatabase you received may be corrupt - try requesting it again. Tell the dataset creator to zip the entire geodatabase directory, from one level above the the files you're seeing. Eg, if the file is called C:\data\FileName.gdb, they should open C:\data in Windows, right-click on FileName.gdb, and zip this. This will create a zip file containing FileName.gdb, which will contain the constituent files. You should be able to preview the geodatabase in ArcCatalog, or add it to ArcMap using the Add Data option. Steve
... View more
06-06-2011
08:12 PM
|
0
|
0
|
3285
|
|
POST
|
The page at http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2011/04/04/test.aspx mentions IE6 performance compared to more modern browsers. - Does this imply that IE6 is still supported in the JS API 2.3? - Are there any known issues with using IE6? Obviously it would be preferable to upgrade IE, but it's not always possible to insist that the user does so..... Cheers, Steve
... View more
06-06-2011
03:55 PM
|
0
|
2
|
932
|
|
POST
|
Hi Chris, Take a look at the Formatting InfoWindows help file at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_formatinfowindow.htm and the sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_infowindow.html to see how to handle this. Steve
... View more
06-05-2011
08:55 PM
|
0
|
0
|
668
|
| 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
|