POST
|
Hello, Iwould like to report some bad data that we're getting back from the ArcGIS Online Geocoding Service. Where might I be able to do that, in an appropriate manner? Is there a form somewhere, or an email address, etc... ? Thanks, - Aaron
... View more
10-10-2013
01:51 PM
|
0
|
1
|
344
|
POST
|
Thanks Kelly, that fixed the issue. Quick follow up: Is the syntax:
var infoWindow = new esri.esri.dijit.InfoWindow({}, dojo.create("div", null, Map.Map.root));
... with two 'esri' namespaces in the constructor, 100% accurate? The documentation says that you should use only one: https://developers.arcgis.com/en/javascript/jsapi/infowindow-amd.html This code:
var infoWindow = new esri.dijit.InfoWindow({}, dojo.create("div", null, Map.Map.root));
... worked for us in production until very recently. The code now throws an error that says that this is not a valid constructor. Did something change? Your code (with two esri.esri name spaces) and the documentation (only one esri namespace) are in conflict. Thanks, - Aaron
... View more
09-03-2013
11:26 AM
|
0
|
0
|
459
|
POST
|
Hi, I'm curious to know if anyone here has been experiencing the same weird behavior we're seeing with the javascript SDK. Sometimes it loads, sometimes it does not. The tile imagery for our basemaps loads, other times it does not. Our application was usable yesterday, but it unusable today. No changes were made to it. The weirdest part is that our javascript does not throw any errors, and the service works at other times albeit very slowly. Has anyone else noticed this today? Thanks, - Aaron
... View more
06-04-2013
04:19 PM
|
0
|
1
|
439
|
POST
|
Hi, I'm trying to use the following sample: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#PortalSearch to search for items that I have created in my organization. We have 3 items in our organization, each is a web map. When I search for any single keyword in the title of these web maps, they do not come back in the results in the sample. I login successfully with my organization's administrative credentials but I can't seem to get the results to show up. What do I have to do to enable searching for items from my organization? Thanks, - Aaron SOLVED IT: The syntax in the example is wrong: {0} and orgid: \"{1}\ Should be: {0} AND orgid: \"{1}\
... View more
05-28-2013
08:59 AM
|
0
|
0
|
243
|
POST
|
Hi, I'm trying to use the following sample: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#PortalSearch to search for items that I have created in my organization. We have 3 items in our organization, each is a web map. When I search for any single keyword in the title of these web maps, they do not come back in the results in the sample. I login successfully with my organization's administrative credentials but I can't seem to get the results to show up. What do I have to do to enable searching for items from my organization? Thanks, - Aaron
... View more
05-28-2013
08:49 AM
|
0
|
1
|
613
|
POST
|
If the URL of your portal item is a feature layer URL (i.e with a layerId at the end such as ....../MapServer/4), your code should work. The risk is that your URL is the URL of a map service or a tiled service. Is this case you have to create the right layer type (i.e ArcGISMapServiceLayer or ArcGISTiledMapService layer). Note: It's one of the advantages of using the webmap model. Under the cover, the service metadata are analyzed and the right layer type is created. OK - I think I get the concept now. Based on your answer to another question I asked it looks like this is the basic process to do what I want to do: 1. Search for layer type portal items. 2. Take portal item of choice and plug it into a web map that you've created programmatically 3. Take that web map and use Document to get the map from it. Does that sound about right?
... View more
05-23-2013
02:07 PM
|
0
|
0
|
748
|
POST
|
Dominique, Can you instantiate web map from a portal item whose type is "feature service"? I'm trying to create a web map asynchronously from an ArcGISPortalItem that is simply a layer of type "feature service" and when I call WebMap.FromPortalItemAsync(...); I get an exception that reads "Invalid Item". Is it expected that this constructor may only be called successfully with an ArcGISPortalItem object whose type is "web map" ? If so, how can I get JUST a layer object from an ArcGISPortalItem whose type is one of the various web/desktop layer types? Thanks, - Aaron
... View more
05-23-2013
09:22 AM
|
0
|
0
|
391
|
POST
|
This seems to work. Is this what you were thinking of? Unfortunately, I'm passing in what I believe is a valid portal item (as it came back from the Portal API search), but the exception says "invalid item"
// Create webmap from portal item
WebMap.FromPortalItemAsync(portalItem, (webMap, exception) => {
if (exception == null) // <- Exception reads "Invalid Item"
{
Document webMapDocument = new Document();
webMapDocument.GetMapCompleted += (obj, args) =>
{
if (args.Map != null)
{
LayerCollection newLayers = new LayerCollection();
foreach (var layer in args.Map.Layers)
{
newLayers.Add(layer);
}
args.Map.Layers.Clear();
MyMap.Layers = newLayers;
}
};
webMapDocument.GetMapAsync(webMap);
}
else
{
tbSearchItemResults.Text = exception.Message;
}
});
What should I look out for when a PortalItem is declared "Invalid" by FromPortalItemAsync ? Thanks, - Aaron
... View more
05-23-2013
09:14 AM
|
0
|
0
|
748
|
POST
|
That's really interesting, I didn't know you could do that. What I want to do is take the ArcGISPortalItem and create an actual layer from it. Is there a way to do this without using the WebMap API? I've tried adding a FeatureLayer from a feature service ArcGISPortalItem object like so: // Fetch portal items via search. Grab one portalItem ... FeatureLayer featureLayer = new FeatureLayer(); featureLayer.Url = portalItem.Url; featureLayer.Initialized += featureLayer_Initialized; featureLayer.InitializationFailed += featureLayer_InitializationFailed; featureLayer.Initialize(); MyMap.Layers.Add(featureLayer); [\CODE] But nothing happens. The map is not updated with the FeatureLayer. Is there a way to map ArcGISPortalItems to the ArcGISTiledMapServiceLayer, ArcGISDynamicMapServiceLayer, etc.... ? It looks like you should be able to do something like this, right? Thanks, - Aaron
... View more
05-23-2013
08:56 AM
|
0
|
0
|
748
|
POST
|
Does anyone have any input on this? Is this even possible with the Silverlight SDK? Will I have to roll my own ArcGIS Online REST API Client?
... View more
05-22-2013
08:46 AM
|
0
|
0
|
748
|
POST
|
If I do a search for layers ("type: layer") using the ArcGISPortal object:
var queryString = string.Format("{0} type:\"layer\" NOT \"web mapping application\"", searchString);
var searchParameters = new SearchParameters()
{
QueryString = queryString,
SortField = "avgrating",
SortOrder = QuerySortOrder.Descending,
Limit = 20
};
_ArcGISPortal.SearchItemsAsync(searchParameters, (results, exception) => { /* do something */ });
I get a list of ArcGISPortalItem objects. In this case they're layers, not web maps. Is it possible to add an item from these search results to an existing map object? I can't seem to find the documentation or samples that show you how to leverage "layer" items rather than "web map" items. Also, the Silverlight docs make mention of using only Web Maps. Perhaps that is a sign that you can't do anything with layers at this time.
... View more
05-21-2013
02:11 PM
|
0
|
7
|
1165
|
POST
|
In the Document's GetMapCompleted event is it possible to get a list of the operational layers from the base map, rather than have to parse the DocumentValues property? The DocumentValues property seems to really only be a CLR object representation of the JSON that makes up the WebMap. I don't think it is. What I want to do is this:
void _webMap_GetMapCompleted(object sender, GetMapCompletedEventArgs e)
{
List<Layer> operationalLayers = e.OperationalLayers;
// Do something with those layers ...
}
Our objective is to parse the web map for everything EXCEPT the basemap and add that to an existing map. Unfortunately I'm not sure that it's reliable to do that because there could be web maps whose basemap is pertinent. Using the map like this is not reliable either because you only know what type of layer you have, not it's intended purpose (base or operational):
foreach(Layer layer in e.Map.Layers)
{
// Is layer operational or base map?
// No way to know?
}
As a last resort we could parse the DocumentValues property for a list of layer IDs for those in the operationalLayers List, then parse those out of the e.Map.Layers list. Again, this might not be reliable. Thanks, - Aaron
... View more
05-21-2013
11:33 AM
|
0
|
3
|
2742
|
POST
|
At 3.4 we switched the map's default info window from esri.dijit.InfoWindow to esri.dijit.Popup and the Popup doesn't have the coords, fixedAnchor and anchor properties. We need to update our documentation to reflect this update and will do so for the next release. If you'd like to switch back to the InfoWindow you can use the following code to switch back to the 'old' info window which does have the properties you are looking for.
map = new esri.Map("map", { extent: initExtent });
var infoWindow = new esri.esri.dijit.InfoWindow({}, dojo.create("div", null, map.root));
infoWindow.startup();
map.setInfoWindow(infoWindow);
Thanks Kelly, that fixed the issue.
... View more
05-03-2013
08:22 AM
|
0
|
0
|
459
|
POST
|
Take the following code and notice that in the browser's javascript console that the map info window's coords, anchor and fixed anchor properites are 'undefined'. Why? Am I using the info window incorrectly? Does this have anything to do with it not having a symbol associated with it? The docs don't make it at all clear what I might be doing wrong. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Info Window Tests</title> <!-- ESRI Required --> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css" /> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/tundra/tundra.css"/> <script type="text/javascript">var dojoConfig = { parseOnLoad: true };</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4"></script> <script type="text/javascript"> dojo.require("esri.map"); var map; var streetsUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"; function init() { var initExtent = new esri.geometry.Extent({ "xmin": -13646149, "ymin": 3606604, "xmax": -12393805, "ymax": 4232776, "spatialReference": { "wkid": 102100} }); map = new esri.Map("map", { extent: initExtent }); var layer0 = new esri.layers.ArcGISTiledMapServiceLayer(streetsUrl, { "id": "Streets", "opacity": 1.0, "visible": true }); var BASE_MAP_ARRAY = [layer0]; map.addLayers(BASE_MAP_ARRAY); dojo.connect(map, "onLoad", function (map) { map.infoWindow.resize(250, 100); }); dojo.connect(map, "onClick", addPoint); dojo.connect(map.infoWindow, "onShow", onInfoWindowShown); } function addPoint(evt) { map.infoWindow.setTitle("Coordinates"); //Need to convert the coordinates from the map's spatial reference (web mercator) to geographic to display lat/lon values var geoPt = esri.geometry.webMercatorToGeographic(evt.mapPoint); map.infoWindow.setContent("lat/lon : " + geoPt.y.toFixed(2) + ", " + geoPt.x.toFixed(2) + "<br />screen x/y : " + evt.screenPoint.x + ", " + evt.screenPoint.y); map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint)); } function onInfoWindowShown() { logMessage("info window coords: " + map.infoWindow.coords); logMessage("info window anchor: " + map.infoWindow.anchor); logMessage("info window fixed anchor: " + map.infoWindow.fixedAnchor); logMessage("info window isShowing: " + map.infoWindow.isShowing); } function logMessage(message) { // Check for a console object var console = window['console']; // Log a message if a log property is available //--------------------------------------------- if (console && console.log) { console.log(message); } } dojo.ready(init); </script> </head> <body class="claro"> <div id="map" style="width:1024px; height:512px; border:1px solid #000;"></div> </body> </html> **EDIT** This is not associated with there being a symbol or a renderer on a graphics layer to which the info window points. I was able to reproduce this problem in a separate application that has both symbols and renderers. The map infoWindow's coords property is always undefined. What am I doing wrong?
... View more
05-02-2013
08:40 AM
|
0
|
3
|
1125
|
POST
|
This:
logMessage("map says layer is loaded. Layer: " + layer + ". Error: " + error + ". Tile Info LODs Length: " + layer.tileInfo.lods.length);
Specifically the layer.tileInfo.lods.length part is what's breaking your page. mapAddLayerResult fires each time a layer is added so it's called each time you add a graphics layer. Since graphics layers don't have a tileInfo property, your code is breaking. Ah, I wasn't sure if that event was even firing when the graphics layer was loaded. I thought it might NOT fire for GraphicsLayers the way it did for other layers. I've removed that bit from the event handler and am all set now. Thanks, - Aaron
... View more
05-01-2013
11:58 AM
|
0
|
0
|
354
|
Title | Kudos | Posted |
---|---|---|
1 | 06-27-2012 11:17 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|