POST
|
Does anyone know how to programatically add a raster image (ungeoreferenced) from the Internet. I can add this image (http://data.cei.psu.edu/pennpilot/era1940/elk_1941/elk_1941_photos_jpg_200\elk_042840_apm_103_36.jpg directly to AGX by selecting Add Content, Add Raster, and then typing or pasting that web address into the box. But when I try to add it programatically, it gives me an error message. One thing I've noticed is that it tells me it can't add the image from http:/data... (notice the single backslash). No matter what I do I can't get it to use two back slashes. The method I'm using is Raster.OpenRasterFile(webaddress) with the webaddress being exactly what I showed above for the url. I've tried other methods too. I was successful downloading the above image programatically using webclient and webclient.downloadfile. That worked, but I ran into troubles trying to add the downloaded image as a raster. Here's what I tried. Dim myImage As Raster = Raster.OpenRasterFile(savepath) dim myRasterLayer As RasterLayer = rasterlayer.OpenFromRaster(myImage) mapdisp.childItems.add(myRasterLayer) This approach also works but then I get an error message that it's got no coordinate system and the georeference option is greyed out so I can't fix it. Any ideas/comments are appreciated. Thanks Ellen
... View more
11-24-2015
01:34 PM
|
0
|
0
|
3759
|
POST
|
Thanks very much Mark! That did it exactly. I'm not sure why I couldn't find that answer on the web; I guess I was looking more for Portal, but Portal is ArcGIS Online in our organization, I guess. Ellen
... View more
10-28-2015
11:56 AM
|
0
|
0
|
323
|
POST
|
I've been wondering for a while (version 2505 and now 3400) how to get information in the Layers control, the one just to the right of BaseMaps. Now I see that the new version of AGX, 3400, has some layers in there. For example, if you click Layers you'll see the DeLorme base maps, several Demographics layers and a layer called Imagery Older and Newer. I've sleuthed around and am almost certain that it is not achieved with a default map, any settings within AGX, or any configuration. So this might not even be the correct location for this question. I've poked around the Portal guide and it does mention that Portal can be configured for basemaps and layers, but does not explain the Layers portion. Thanks for any insight you might have. ~Ellen
... View more
10-22-2015
01:19 PM
|
0
|
2
|
3363
|
POST
|
I don't have a solution, unfortunately, but I can confirm that the IPhone's coordinates arent' read properly by AGX. I had a coworker who took pictures in the field, but they did not map correctly. I wonder if the new verions (3400) has fixed this. It was reported as a bug.
... View more
10-19-2015
02:18 PM
|
0
|
0
|
230
|
POST
|
What? No one has replied yet to Joe's post? I downloaded it last night and tried to install it. But either I didn't get it installed correctly, or it's very very similar to 2505...I did see one minor change but am not sure how to use that function yet. It looked a wee bit like something that might handle historic imagery. swoon. Mark Bockenhaurer, thanks for your support pushing AGX forward! Can you share with us what's new? Ellen
... View more
10-08-2015
12:08 PM
|
1
|
4
|
668
|
POST
|
I think you're asking whether right-click removes a vertex works in the ArcGIS Explorer application. (Not asking about removing a vertex in VB through the SDK). You reported that it does not seem to be working. I can tell you that it does work, however, it removes only the last vertex created by the user. So you can add vertices by left clicking, and then you can "back up" by right-clicking, one vertex at a time, all the way back to the beginning if you wish. Perhaps you are trying to hover over a specific vertex and right clicking. That does not work. You can only remove the most recent vertex that you created. Hope this helps. Ellen Bryson
... View more
09-03-2015
07:49 AM
|
1
|
1
|
600
|
POST
|
Did you intend to post your question here in the ArcGIS Explorer Desktop area? You mention an explicit Identify tool, which ArcGIS Explorer Desktop does not have, but ArcMap does. In AGX you just click on the map near a feature to get information about the feature--no identify tool needed! But it does not return any information from any basemap. I know that you can't get the imagery date from ESRI basemaps from within ArcGIS Explorer Desktop unless you develop an add-in tool of your own. But you can get the imagery date from within ArcMap using the identify tool. hope this helps. Ellen
... View more
09-01-2015
10:13 AM
|
0
|
0
|
380
|
POST
|
Norm, Thanks very much. I was hoping you'd pipe in. I took your suggestions and your code and got it working! For those interested, I've posted the code below. It basically creates an Image Overlay by creating a bitmap from given text, using your desired font, colors, etc and then adding that bitmap to the map as the overlay. Note the use of the Imports System.Drawing.Imaging, which is required. Imports System.Drawing.Imaging ... (other coding as needed to achieve the goal) Dim mapDisp As MapDisplay = ESRI.ARcGISExplorer.Application.Application.ActiveMapDisplay Dim overlayColl As ImageOverlayOrderCollection = mapDisp.ForegroundOverlays 'create the text you want to appear. set colors, foreground, background, font size, etc. Dim overlayText As String = "Here's the text I'd like to appear" Dim BackColor As Color = Color.Orange Dim FontColor As Color = Color.White Dim borderColor As Color = Color.Black Dim fontName As String = "Calibri" Dim fontSize As Integer = 16 dim objFont As New Font (fontName, fontSize) Dim height As Integer = fontSize * 2 Dim width As Integer = 400 Dim myPen As System.Drawing.Pen = New Pen(borderColor,2) Dim objPoint As New PointF(5.0F,5.0F) 'this is not an esri point. it's a system drawing point Dim objBrushForeColor As New SolidBrush(fontColor) Dim objBrushBackColor As New SolidBrush(backColor) 'make a new bitmap at the desired size dim objBitmap As New bitmap(width,height) 'make a graphic from this empty bitmap Dim objGraphics As Graphics = Graphics.FromImage(objBitmap) 'modify the graphic as desired/needed objGraphics.DrawRectangle(myPen,0,0,width,height) objGraphics.FillRectangle(objBrushBackColor,objPoint.x,objPoint.Y,width,height) objDrawString(overlayText, ojbFont, objBrushForeColor,objPoint) 'now create the image overlay using this bitmap Dim indOverlay As ImageOverlay = New ImageOverlay("Image Source",objBitmap) indOverlay.DisplayPosition = DisplayPosition.TopCenter mapDisp.Map.ImageOverlayDrawingOrder.AddToTop(indOverlay) thanks again Norm 'editors note. changes were made throughout on 9/7/2015. several errors were found ~Ellen
... View more
08-10-2015
09:02 AM
|
0
|
1
|
459
|
POST
|
The AGX version 2500 supports map text, either fixed to a specific location on earth's surface, or positioned relative to the map display (e.g, always top center, regardless of where user zooms.) However, the SDK was unchanged from version 1750. I'd like to create text programmatically in an add-in but don't see how to do that. To do this, I need to create something (graphic, text overlay, ?) but don't see any constructor for this type of text. Thanks for any suggestions. ~Ellen
... View more
08-06-2015
11:48 AM
|
0
|
3
|
3086
|
POST
|
Very excited Mark! Looking forward to trying 3400 out. ~Ellen
... View more
06-17-2015
01:14 PM
|
0
|
0
|
338
|
POST
|
Cory and other AGX enthusiasts I too am watching eagerly for another release. A question about your post: what improved handling of basemaps and services are you wishing for? I've been able to use many basemaps and services fairly well, or so I thought. Maybe I'm missing something good?.
... View more
06-04-2015
11:26 AM
|
1
|
1
|
899
|
POST
|
I am interested in this discussion, as I too am concerned that we won't have AGX around for much longer. Just wanted to express that. I'd be interested in a possible Runtime, but don't know enough about that. I'll be researching it, but if any one has a good url for more info, thanks in advance. And my vote of thanks, too, to Mark, he seems at least somewhat responsive to the AGX community without visible support from ESRI.
... View more
05-28-2015
07:03 AM
|
0
|
0
|
342
|
POST
|
Hi Norm I was able to use TargetLocation and get a new point. Thanks for that. As you suspected, it doesn't work for polygons and probably not paths either, which I did not test. I had previously created a polygon by serializing (I believe I did anyway, I read an http response as xml and 'manually' created the polygon by working through the coordinate pairs.) For anyone interested, create an ArcGIS Explorer Note of the Point type, using my coding above and using the kmlNode.TargetLocation to create a new point. Then, Dim newNote As ESRI.arcgisexplorer.Mapping.Note newNote = New Note("A new note",kPoint) mapdisp.Map.ChildItems.Add(newNote) Again Norm, thanks very much! Next item on my task list? Create xslt to take kml to nmc? Ellen
... View more
05-18-2015
02:21 PM
|
0
|
0
|
332
|
POST
|
Hi Norm thanks very much for the ideas. I was able to do a lot with the code you supplied. In particular the Descendents was very helpful and I didn't know about that before. I'm still having trouble though. I don't seem to be able to clone the kml node into a map item. I get the message "esri.arcgisexplorer.mapping.kmlnode.createfromxmlstring not found. I know the clone is causing it as I've got error messages before and after. Any thoughts? Here's the code I've got so far. (I had to create VBA from what I think was c#.) 'the following assumes that you have a kml item as the first item in the map Dim kml As KmlLayer = mapDisplay.Map.ChildItems.GetFirst' 'create a collection of kmlNodes I can work through Dim kmlNodes As System.Collections.Generic.IEnumerable(Of MapItem) = Nothing kmlNodes = kml.Descendants Dim indItem As KmlNode Dim kmlType As KmlNodeType For Each indItem In kmlNodes kmlType = indItem.GraphicsType() Select Case (kmlType) Case KmlGraphicsType.Icon MsgBox("at the kml graphics type equal to icon") 'i get the above message. Dim mapItem As MapItem = indItem.Clone 'I don't get the following message. Line above bombs. MsgBox("here's the cloned map item " & mapItem.Name) mapDisplay.Map.ChildItems.Add(mapItem) ' Case (KmlGraphicsType.Path) 'its a path Case (KmlGraphicsType.Polygon) 'its a polygon MsgBox("I found a polygon") Dim theGeometryStr As String = indItem.Tag Case Else MsgBox("not a point, line or polygon. ignore for now") End Select Next End Sub I think I'm missing how to get the placemark's geometry. Any suggestions? And thanks again for the ideas. Ellen
... View more
05-17-2015
09:26 AM
|
0
|
2
|
332
|
POST
|
I'm trying to convert a kml layer to a note using the ArcGIS Explorer Desktop SDK. I know that AGX can do this because if you right click on a kml layer in the application itself you get the option to save or share it as a note. But I can't see anywhere in the SDK how to do this programmatically. Any ideas? Thanks! ~Ellen
... View more
05-13-2015
09:32 AM
|
0
|
4
|
3901
|
Title | Kudos | Posted |
---|---|---|
1 | 04-03-2015 08:24 AM | |
1 | 04-03-2015 08:58 AM | |
1 | 09-03-2015 07:49 AM | |
2 | 03-19-2015 01:52 PM | |
1 | 10-08-2015 12:08 PM |