Code Gallery
Hyperlink tool (VB)
|
This hyperlink tool allows users to click your Web ADF Application map and link to more information for that location. You can link to more information using attribute values retrieved from the map service or using the coordinates from the X/Y location where the user clicked. The X/Y location can also be projected to any supported ArcGIS Coordinate system to integrate with other web sites. For example, when linking to Google Street View you should project to WGS 1984. If multiple hyperlinks are found for a location, a callout pops up displaying all available hyperlinks.
The zip file contains a sample web application for the city of Portland Oregon. It uses the web service from the arcgisonline sample server so you can easily run it without changing any configurations. The sample application illustrates a hyperlink that uses attributes from the map service and an X/Y location to link to Google Street View. Use the Readme.doc for instructions on how to integrate this tool in your existing application.
|
|
Report Inappropriate Content: This Code Gallery is intended for the free exchange of code related to ESRI software products. Let us know if this entry is inappropriate (e.g., a download for a commercial product).

C# also available posted by tbrenneman@esri.com on Aug 28, 2008 1:56 PM
For the C# version see: http://resources.esri.com/arcgisserver/adf/dotnet/index.cfm?fa=codeGalleryDetails&scriptID=15787
scriptmanager error posted by kebedel_new on Sep 02, 2008 12:15 PM
Tom: This will be another homerun like the gridresults. Thanks for the great work. Trying to run the Portland sample from Visual studio .net 2005 (VB) on .net framework 2.0, I'm getting the following error: "ScriptManager is not a known element." Any thought? I was wondering if this requires VS2008. Lema
.NET 2.0 sample app posted by tbrenneman@esri.com on Sep 03, 2008 6:06 AM
The sample app targets .NET 3.5. To get the sample to work in VS 2005 you need to build it for .NET 2.0. The sample is easy to recreate in VS 2005. You just need to follow the instructions in the readme and: • Copy the XML file from the sample web site over the XML file in your app_data. • Setup the map resource manager to use the same resources as the sample. I’ll build another one for .NET 2.0 but I may not get to it today.
Update posted by tbrenneman@esri.com on Dec 04, 2008 6:28 PM
I just uploaded a new version of this tool. I fixed a JavaScript bug for positioning the callout. I also added a lot of error handling so if something is wrong in the configuration you will get a good error telling you what needs to be fixed. If you've been getting the "object not set to an instance..." error or the process indicator icon that never goes away, this will help you diagnose what the problem is. I also recreated the samples in VS 2005 so both VS 2005 and 2008 can work with the samples. Sorry this was such a long time coming.
Update requires 9.3 SP1 posted by tbrenneman@esri.com on Dec 04, 2008 8:20 PM
You need 9.3 SP1 for the updated sample apps.
Hyperlink posted by shibu98 on Jan 20, 2009 8:56 AM
Is "hyperlinking" going to be part of the package in the upcoming version of ArcGIS Server?
Field does not exist error posted by msamwill on Jan 26, 2009 8:29 AM
Hello, I'm setting up this tool in a web mapping application. I keep receiving an error that the field does not exist in the layer. The field does exist so I'm not sure what is causing the error. The feature is a polygon would I need to change the default PointBuffer size perhaps?
Great Tool posted by ari1isaak on May 08, 2009 10:17 AM
I published a blog post with a video on how we are using this tool at the Port of San Diego. Great tool. http://posdgis.wordpress.com/2009/05/07/using-google-streetview-within-the-portgis-explorer-web-application/
Fully qualified field name. posted by tbrenneman@esri.com on May 08, 2009 11:32 AM
kebedel_new, Could it be that your field is in an RDBMS and you need the fully qualified name of the field like user.table.field?
9.3.1 compatability posted by tbrenneman@esri.com on Jul 07, 2009 10:46 AM
If you try this sample with 9.3.1, you might notice that you need to click twice to get the callout to display. to fix this: In callout.js, comment out line 71. Like so: //myCallout.set_calloutBuffer(0); Callouts changed with 9.3.1 (more customizable).
App_Code posted by bcales on Aug 06, 2009 8:20 AM
How can I have App_Code for vb and one for cs so I can mix the two?
Error posted by ForestGISChic on Aug 28, 2009 11:15 AM
I am using VS 2005. I've followed the read me and brought all the files into my project. The first error is: Class 'Hyperlink' must implement 'Sub Unload(info As ToolbarItemInfo)' for interface 'ESRI.ArcGIS.ADF.Web.UI.WebControls.Tools.IToolbarItemSetup' But the code has the Sub Unload already. The second error is: 'Is' requires operands that have reference types, but this operand has the value type 'Boolean'. Any thoughts?
Google and Virtual Earth posted by ForestGISChic on Sep 14, 2009 7:35 AM
I was able to get past my errors but now when google maps opens up it gives me a grey screen. Does anyone know what might be going on. I am also trying to connect to bing maps (microsoft virtual earth). Does anyone know how to do that with this tool? It also doesn't work when I click on my momunments (have set up in the hyperlink.xml) to return the callout with the link from the attribute table. Any help is appreciated. Thanks, Dawn
Hyperlink using attribute field with complete URL address posted by walt on Oct 19, 2009 12:05 PM
I attempted to modify the hyperlink.xml file for this tool to use one field that contains a URL address with no need to concatenate the content with a text string. That is, I altered the following:http://www.foo.com/detail.cfm?action=assessor&id={0}
to:
{0}
This resulted in an error with using the hyperlink tool to click on a polygon. The popup errror message was that the "index value was not greater than or equal to zero or less than the number of items"
All I want is a tool to allow the user to click on the map and have a webpage pop up and was hoping that I could modify an existing sample.
Seems like simulating a ArcMap field Hyperlink should be a commonly needed tool for a Web Application??
Walt
ArcGisserver is not a member of datasources posted by dmad3007 on Dec 09, 2009 1:47 AM
Tom, Downloaded code and followed instructions edited xml but keep getting this error in hyperlink vb "ArcGisserver is not a member of datasources" i have looked at imports and shows you have commented out one "'Imports ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer" i am using vs 2005 any ideas?
If you would like to post a comment, please login.