|
POST
|
This is something that I believe needs better documentation - I just tried to find a link to send to you, but I can't see where it's documented. You need to host the sample within a web server before it'll work - the Esri API won't work if you're trying to view an HTML file which is stored in a normal directory/folder. If you have access to a web server you can FTP the file onto it and run it there. If you don't have access to a web server, you can set up a local web server on your computer and access it via http://localhost Try searching for "how to set up a local web server" in Google for instructions on how to do this (it varies between Mac and PC). Good luck, Steve
... View more
01-16-2013
12:47 PM
|
0
|
0
|
2307
|
|
POST
|
This might help to save some time if you're seeing problems with your Bing Maps today. It turns out that some Bing Maps keys expired on Jan 15th: Posted: January 14, 2013 Bing Maps Service Announcement: Metro Style Apps (BETA) Key Expiration Notification Windows 8 legacy key is set to expire January 15th, 2013. (Thanks for the awesome heads-up, Microsoft - a full day!) You can create a new key using the Bing Maps Portal: https://www.bingmapsportal.com/ Steve
... View more
01-15-2013
01:19 PM
|
0
|
2
|
1115
|
|
POST
|
Hi Martin, It's been a few years since I looked at this, so I've forgotten how I resolved it. The page I was working on 2 years ago is at http://atlas.nsw.gov.au/public/nsw/home/map/elections.html If you search for (and put a break on) the line timeSlider.setThumbIndexes it looks like I set an array of the known dates which should have a marker [ATTACH=CONFIG]19891[/ATTACH] I then assign these as the timeStops:
timeSlider.setThumbIndexes(theme.timeAware.startIndex);
if (theme.timeAware.timeStops) {
timeSlider.setTimeStops(theme.timeAware.timeStops)
}
Does that help? Cheers, Steve
... View more
12-12-2012
12:37 PM
|
0
|
0
|
1087
|
|
POST
|
Bingo. I used a much simpler version of your suggestion to "reset" the size after showing a large infoWindow:
dojo.connect(map.infoWindow, "onHide", function () {
map.infoWindow.setContent("");
});
Thanks, Steve EDIT: This doesn't actually work. I'll keep working on it but I think your suggestion is on the right track
... View more
12-11-2012
12:14 PM
|
0
|
0
|
1187
|
|
POST
|
Click on a feature in the Popup sample, and note that the map's infoWindow automatically displays at the optimal size for its content. It is possible to override this size using map.infoWindow.resize(500,500) - thereafter, the infoWindow always opens at this size when clicking on new features. How can I "reset" the size so that the infoWindow automatically resizes to fit its content once more, after I've used map.infoWindow.resize()? In other words, how can I "undo" the resize command without specifying a new size? Background - I have a multi-layer map and I'm manually resizing the infoWindow to suit a particular layer's infoWindow, but I wish for the infoWindow to return to normal auto-sizing behaviour when clicking on other layers. Thanks, Steve
... View more
12-06-2012
02:10 PM
|
0
|
3
|
4650
|
|
POST
|
Hi Derek, Thanks very much for the info, which is very helpful. the main use case for createMap is to create an ArcGIS API for JavaScript map from an ArcGIS.com webmap ID. Ideally, you use ArcGIS.com to author your web map (add layers, configure pop-ups, set the extent, etc.) and then use the webmap in your app by passing in the ArcGIS.com item id to createMap. I'm trying to ensure that my applications are as compatible as possible with ArcGIS.com for a bit of future-proofing, and to potentially allow ArcGIS.com to be used as a configurator. Cheers, Steve
... View more
12-05-2012
12:34 PM
|
0
|
0
|
779
|
|
POST
|
...programmatically manage adding MO at the end of a city name *if the user doesn't specify*. George, note that this should default to MO, but still allow the user to search anywhere, so restricting the search may not be optimal. Cheers, Steve
... View more
12-04-2012
04:16 PM
|
0
|
0
|
1403
|
|
POST
|
Next I check to see if inputAddress already has the Missouri prefix, MO, at the end of the string: var checkMO = inputAddress.SingleLine.slice(-2).toUpperCase();
if ( checkMO !== 'MO' ) {
console.log("not MO");
inputAddress = inputAddress.SingleLine + ", MO";
console.log(inputAddress);
}else {
console.log(inputAddress.SingleLine + " has MO");
} Before you pass inputAddress to the locator, what value is shown in your console.log(inputAddress) call above? Steve
... View more
12-03-2012
06:16 PM
|
0
|
0
|
1403
|
|
POST
|
The Create Web Map sample shows how to build an application using esri.arcgis.utils.createMap 1) Does this method support feature layers? 2) If so, what is the required JSON definition for a feature layer, including specifying its infoWindow? 3) Are there any samples showing utils.createMap with a feature layer? Thanks, Steve
... View more
12-03-2012
03:53 PM
|
0
|
2
|
1181
|
|
POST
|
Pity the widget's gone - but how cool is that 404 page....
... View more
12-01-2012
03:59 PM
|
0
|
0
|
963
|
|
POST
|
There's a sample geocoding service from Esri at http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer which looks like this: Single Line Address Field: SingleLine (Type: esriFieldTypeString, Alias: Single Line Input, Required: false ) Candidate Fields: Score (Type: esriFieldTypeDouble, Alias: Score) MatchLevel (Type: esriFieldTypeString, Alias: Match Level) North_Lat (Type: esriFieldTypeString, Alias: North_Lat) South_Lat (Type: esriFieldTypeString, Alias: South_Lat) West_Lon (Type: esriFieldTypeString, Alias: West_Lon) East_Lon (Type: esriFieldTypeString, Alias: East_Lon) Which options do I need to specify in ArcCatalog to publish a similar geocoding service from a point featureclass with a single "Name" field specifying the addresses I'm searching on? I'm choosing > New > Address Locator and choosing the "General - Single Field" option, but my geocoding service in the REST API looks like this: Address Fields: SingleKey ( type: esriFieldTypeString , alias: Key , required: false , length: 100 ) Single Line Address Field: Single Line Input ( type: esriFieldTypeString , alias: Key , required: false , length: 100 ) Candidate Fields: Shape ( type: esriFieldTypeGeometry , alias: Shape , required: false ) Score ( type: esriFieldTypeDouble , alias: Score , required: false ) Match_addr ( type: esriFieldTypeString , alias: Match_addr , required: false , length: 120 ) Ref_ID ( type: esriFieldTypeString , alias: Ref_ID , required: false , length: 40 ) Addr_type ( type: esriFieldTypeString , alias: Addr_type , required: false , length: 20 ) This isn't behaving in the same way when I try to use a geocoding call which works against the sample Esri service. What options should I be choosing in ArcCatalog when I create the address locator, in order to replicate the Esri version? Thanks, Steve
... View more
11-20-2012
08:20 PM
|
0
|
6
|
1678
|
|
POST
|
For any call stacks that you initiate then I guess standard try/catch should work Thanks, I'll give that a go. In some cases though these errors may originate from run-time events which I can't predict now, which is why I'm hoping for a map-level onError event. Cheers, Steve
... View more
11-14-2012
01:14 PM
|
0
|
0
|
1338
|
|
POST
|
You want to catch unhandled exceptions, correct? (and ideally you're hoping that the API doesn't just 'swallow' these thus preventing them propagating to your code) Hi Rich, Yep, that's what I meant (and wish I could have said so succinctly). Steve
... View more
11-14-2012
11:52 AM
|
0
|
0
|
1338
|
|
POST
|
Hi Derek, Let me rephrase to clarify: There are certain events for which the JS API provides an error handler. Eg, you can listen for a layer's onError event, which fires whenever there is a problem with a specific layer. You can listen for the map's onLayersAddResults event, which fires if there was a problem adding any layer to the map. Is there a way to trap any generic error which is returned by the map object? I did something which caused the above-mentioned KML parser error, which triggered a FireBug error message. How can I trap those type of error messages (not specifically the KML parser error, but any error messages which are shown in FireBug? That way, I can warn users who are not using a debugging plugin that there has been a problem. Thanks, Steve
... View more
11-14-2012
09:57 AM
|
0
|
0
|
1338
|
| 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
|