POST
|
I was able to add an image to the map after I defined the four corners of the image. As far as I know, it doesn't read a tfw file or the header of a geotif. Here's an example of how I got it to work. The projection of my map was 3857 so my image had to be in the same projection: var xminValue = -10897188.6297; var yminValue = 1929703.88984; var xmaxValue = -8790353.14023; var ymaxValue = 3759053.72948; var spatialReferenceValue = 3897; var hrefValue = "http://www1.ln.ncddc.noaa.gov/website/AGSViewers/JS_Examples/data/amax.png"; var lyrSample = new esri.layers.MapImageLayer(); var lyr = new esri.layers.MapImage({'extent':{'xmin':xminValue,'ymin':yminValue ,'xmax':xmaxValue,'ymax':ymaxValue,'spatialReference':{'wkid':spatialReferenceValue}},'href':hrefValue}); lyrSample.addImage(lyr); Hope this helps.
... View more
08-14-2012
12:45 PM
|
0
|
0
|
1245
|
POST
|
I think you got your double quotes and single quotes messed up. Try this: content+="<td><a href="http://surveyor.slco.org/javamap/mrs_test.cfm?"+layerResults.features.attributes['POINT_NAME']+layerResults.features.attributes['LATITUDE_DD']+ " target="_blank">Mon. Ref Sheet</a></td>";
... View more
05-04-2012
11:58 AM
|
0
|
0
|
272
|
POST
|
Thanks Derek. That fixed it. Didn't realize there were all those empty spaces since you don't see them when you bring the layer up in ArcMap.
... View more
04-26-2012
06:17 AM
|
0
|
0
|
258
|
POST
|
Does anyone know why this doesn't work: var imageParameters = new esri.layers.ImageParameters(); var layerDefs = []; layerDefs[1] = "vdate='2012/04/26-00Z'"; imageParameters.layerDefinitions = layerDefs; imageParameters.layerIds = [1]; imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW; imageParameters.transparent = true; lyr = new esri.layers.ArcGISDynamicMapServiceLayer("http://www.ncddc.noaa.gov/arcgis/rest/services/Models/NWS_AirTempForecasts/MapServer", {"imageParameters":imageParameters,"opacity":0.90}); map.addLayer(lyr); If I go to the REST service for this map and to the query page of this particular layer, I can enter the vdate string of 2012/04/26-00Z and get a result. But if I try to use the layerDefinitions option, I get no results.
... View more
04-25-2012
01:39 PM
|
0
|
2
|
1112
|
POST
|
I haven't had much success with .removeAllLayers but I've used the .hide() instead to remove layers from being displayed on a map. I add and hide layers all the time this way. I took your kml link and was able to add it to the map, and then hide it from the map.
... View more
04-12-2012
10:04 AM
|
0
|
0
|
849
|
POST
|
I know you can set the infoWindow size using the map.infoWindow.resize(x,y) command. My question is whether you can dynamically calculate what the size of that window should be based on the content. I have some information windows that contain a lot of content and therefore need to be very large. I have other information windows that contain very little content and therefore don't need to be very large. So programmatically I would like to figure out the size of each information window for each individual point. Can this be done?
... View more
03-29-2012
06:34 AM
|
0
|
1
|
630
|
POST
|
I'm trying to add a KML file using the KMLLayer command. I have been able to successfully add the kml to the map but the image is not overlying correctly. The image appears to be skewed ... as you move northeast to southwest, the image gets more skewed. Attached are a few screenshots ... one of the whole area, one off of Cuba, and one of Tampa Bay. The kml displays properly in google earth. Here's the link to the kml: http://edac-dap.northerngulfinstitute.org/habsos/chlA_overlay_3day_chl_erd_latest.kml Any clues would be greatly appreciated.
... View more
03-20-2012
11:47 AM
|
0
|
4
|
949
|
POST
|
Thanks Derek. I really appreciate your help on this.
... View more
03-14-2012
03:45 PM
|
0
|
0
|
398
|
POST
|
I don't know how to do that. The emoticons are colons.
... View more
03-14-2012
01:36 PM
|
0
|
0
|
398
|
POST
|
<kml>http://edac-dap.northerngulfinstitute.org/erddap/griddap/MODIS_Aqua_3-day_composite_CHL.kml?chl_a[(last)][(17.086376190185547):(31.566356658935547)][(-97.91387176513672):(-78.65940856933594)]&.draw=surface&.vars=longitude|latitude|chl_a&.colorBar=Rainbow||Log|0|50|</kml>
... View more
03-14-2012
01:34 PM
|
0
|
0
|
398
|
POST
|
I have to add a kml layer to a map. This is the kml url address I was given: http://edac-dap.northerngulfinstitute.org/erddap/griddap/MODIS_Aqua_3-day_composite_CHL.kml?chl_a[(last)][(17.086376190185547):(31.566356658935547)][(-97.91387176513672):(-78.65940856933594)]&.draw=surface&.vars=longitude|latitude|chl_a&.colorBar=Rainbow||Log|0|50| This address will open in Google Earth and Google Maps properly but I can't seem to get it to do anything in the ArcGIS JavaScript API. I've made sure to load the esri.layers.KMLLayers utility. I made a variable called kmlURL and have the url address I posted above saved to that variable. I then try to add the kml by using the new esri.layers.KMLLayer(kmlURL) to the map. Nothing happens. Is the URL address I've been given too complicate? Any help would be greatly appreciated.
... View more
03-14-2012
11:31 AM
|
0
|
6
|
517
|
POST
|
You might want to try setting your image format to be png32. By defining the ImageParameters, you can set the format to be png32. So try the following: var imageParameters = new esri.layers.ImageParameters(); imageParameters.format = "png32"; var lyr = new esri.layers.ArcGISDynamicMapServiceLayer(<dynamicMapService URL>,{"imageParameters":imageParameters}); I tried this recently on some current arrows I was trying to draw that were drawing as white outlines even though they had been defined to be black. It removed the white outline and made the symbol look clear. It also worked with points that had halos around them. I don't know about annotation though but at least you can give it a try.
... View more
03-08-2012
06:13 AM
|
0
|
0
|
275
|
POST
|
Here's how to add a WMS service of a different projection such as 4326 to a basemap (102110): var layer1 = new esri.layers.WMSLayerInfo({name:"1",title:"Rivers"}); var resourceInfo = { extent: new esri.geometry.Extent(-126.40869140625,31.025390625,-109.66552734375,41.5283203125,{wkid: 4326}), layerInfos: [layer1] }; var lyr = new esri.layers.WMSLayer("http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer", {resourceInfo: resourceInfo, visibleLayers: ["1"] }); map.addLayer(lyr); If you define the resourceInfo, you bypass the getCapabilities call that is executed when you use WMSLayer command ... this means you don't have to use a proxy page
... View more
03-07-2012
05:59 AM
|
0
|
0
|
406
|
POST
|
I think with the use of HTML5, you can drag and drop files into ArcGIS Javascript. There is ESRI on-line seminar today (Feb 23) talking about this topic. There is an example of dragging and dropping a local CSV file into a map and having the points plotted on the map. Look at the HTML5 - File Access with Drag and Drop in the Javascript API Samples.
... View more
02-23-2012
07:24 AM
|
0
|
0
|
219
|
POST
|
Yes. The data is being served out on an ArcGIS Server here and I access it through its REST url. You said earlier that you could output your data as a csv. You could use the dojo's CsvStore function to load your csv file and within the CsvStore function there is a query option to retrieve only those points you want to be displayed. Here's a snippet that might start you in the right direction: var species_name = "Karenia brevis"; var dataStore = new dojox.data.CsvStore({url:"data.csv"}); dataStore.fetch({ query:{species: species_name}, onComplete: function(items, request) { dojo.forEach(items, function(item, index) { var lat = dataStore.getValue(item, "Latitude"); var lon = dataStore.getValue(item, "Longitude"); var symbol = new esri.symbol.SimpleMarkerSymbol(); var latitude = parseFloat(lat); var longitude = parseFloat(lon); var geometry = new esri.geometry.Point(longitude,latitude); geometry = esri.geometry.geographicToWebMercator(geometry); dataLayer.add(new esri.Graphic(geometry, symbol)); }); }, onError: function(error) { alert("Unable to read data file"); } }); It's a bit more complicated just because you are having to read your points in via a data store vs a map service. As long as your csv file is on the same server as your JS API, you don't have to use a proxy service. I don't know how you can retrieve the data you have posted out on ArcGIS Online so you will need to get some help from ESRI about doing that. I've never done that before.
... View more
02-09-2012
12:08 PM
|
0
|
0
|
136
|
Title | Kudos | Posted |
---|---|---|
1 | 04-29-2015 01:36 PM | |
1 | 12-19-2012 05:10 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|