Configuration Walkthru - AppGeo/GPV GitHub Wiki
This section of the GPV wiki provides an overview of the steps necessary to configure a working instance of the GPV including the minimum entries required in the configuration tables. More information is available about each configuration table in the [Database Schema](Database Schema) section of this site. It is necessary that you have read write access to both the configuration tables and code and the web.config file.
Map Service Configuration
GPV configuration requires a typical Esri ArcGIS Server map service. Here are a few points to consider when defining the map service.
- The layer names used in the map definition must match the LayerName in the [GPV Layer] (GPVLayer) configuration table.
- Add some basic layers that you would like to appear in your GPV Application. A good start is Parcels, Town Boundaries, Road Names, and Buildings.
- Scale trapping/thresholds are honored.
- Layers draw in order that they appear in the .mxd.
- A Municipal Boundary or similar layer should always appear so that there is always a layer turned on.
- Check your Municipal Boundary values when the map service starts up. If your Min/Max X, Y are off you may need to reset your FullExtent values in the [web.config file](Web.config Settings).
GPV Configurator
GPV configuration activities can be done using a SQL editor directly within the configuration database, or using the GPV Configurator, whichever is more convenient. The GPV Configurator is a Microsoft Access forms-based application that provides and easy way to navigate and manage a GPV viewer configuration. See the [GPV Configurator](GPV Configurator) page for more details.
Basic Application and Map Configuration of the GPV
NOTE: In all tables below the GPV prefix precedes the table name. If the prefix was changed during the database setup your table will begin with that prefix instead.
GPV Application/Map Tab Configuration
-
Open your SQL manager software.
-
Navigate to the database that stores your GPV tables.
-
Create the [List to Table Conversion Function](List to Table Conversion Function) which is used to manage lists selected features with stored procedures.
-
Edit the GPVApplication table and enter the information for the minimum following fields. An application is the highest level of GPV configuration.
- ApplicationID is the ID name used within the GPV configuration tables to refer to this application. Use a naming scheme that works for your installation.
- DisplayName sets the display name for this instance of the GPV application. You can set up multiple applications for different purposes so choose your name carefully.
- FunctionTab allows up to 4 predefined function settings in a comma separated list.
- FullExtent may change from your municipal extent as set in the web.config to specify a project area
- CoordinateModes allows choice of one or more predefined settings.
- TrackUse logs usage of this application instance. Set 1 for yes 0 for no.
- About provides metadata text about this application instance that appears when clicking on help.
-
Edit the GPVMapTab table and enter the information for the minimum following fields. A map tab is a thematic list of layers shown on the map.
- MapTabID is the ID name used within the GPV configuration tables to refer to this map tab. Use a naming scheme that works for your installation.
- DisplayName is the title of the map tab in this instance of the GPV Application site.
- MapHost the name or IP of the machine that is hosting your ArcGIS Server map service.
- MapService the name of your map service.
- DataFrame can be set to a specific data frame if you have multiple data frames set up within the map service definition.
-
Edit the GPVApplicationMapTab table and enter the information for the minimum following fields. This table links your map tab to your application.
- ApplicationTabID the ID name of the GPVApplication.ApplicationID that you entered above.
- MapTabID the ID name of the GPVMapTab.MapTabID that you entered above.
- SequenceNo this will set the map tab display order once you have defined multiple map tabs.
-
Edit the GPVLayer table and enter the information for the minimum following fields. This table defines which layers are going to display from your map service.
- LayerID is ID name used within the GPV configuration tables to refer to this layer. Use a naming scheme that works for your installation.
- LayerName exact name of the layer as it appears in the ArcGIS Server map service.
- KeyField is the name of the key field in the layer (i.e. OBJECTID, etc.). This allows features of this layer to be identified and selected in stored procedures defined later. NOTE: the GPV does not use the feature attribute tables at all for queries. Only shapes and IDs are pulled from these feature classes. Feature attributes are selected from database tables using stored procedures.
-
Edit the GPVMapTabLayer table and enter the information for the minimum following fields. Each row in this table defines a distinct layer to be shown on the map.
- MapTabID the ID name of the GPVMapTab.MapTabID that you entered above.
- LayerID the ID name of the GPVLayer.LayerID that was given to the layers to appear in the map tab.
- AllowTarget defines whether or not this can be a target layer 1 for yes, 0 for no. NOTE β you might change this later when setting up queries.
- AllowSelection defines whether or not this can be a target layer 1 for yes, 0 for no. NOTE β you might change this later when setting up queries.
- ShowInLegend if your Application is set up with a legend do you want this layer to show in the legend, 1 for yes, 0 for no.
-
Once the tables have been edited run the website CheckConfiguration tool (www.yoursitename.com/Admin/CheckConfiguration.aspx)
GPV Query and Data Tab Configuration The GPVQuery table controls the selection tab and the pull down on the selection tab. The selection tab is one of the function options that is turned on and off in the GPVApplication table. This tab will appear in the top right section of the GPV. The GPVDataTab table controls the details that will display for the selected feature in your query. The data tabs appear in the lower right section of the GPV. You can have multiple sets of data tabs to display various groupings of details.
Here is a good time to distinguish between a [data ID](Map and Data IDs) and a [map ID](Map and Data IDs). Some map IDs will have a one-to-many relationship with data IDs. For example, letβs think about parcel data. A parcel is the object on the ground taking up area. One parcel can have one property, such as a single family house, or many properties, such as is the case with condos. So the CAMA table might use a MBL field to join to the Parcel polygon layer through the MAP_PAR_ID field. In this case MBL would be your data ID and MAP_PAR_ID would be your map ID.
Setup a Query
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure. ** The stored procedures follow the naming convention GPVQuery_NameofyourProcedure (i.e. GPVQuery_ParcelsAll)
- Write your query using the Query Stored Procedure as an example.
- Create the stored procedure.
- Test the stored procedure by running the procedure with a value.
- Edit the GPVDataTab table and enter the information for the minimum following fields.
- QueryID β unique identifier to the query can be the same as the DisplayName.
- LayerID β the name of the LayerID from the GPVLayers table that this query will be using.
- DisplayName β how the name of the query should appear on the page.
- ConnectionID β contains the connection string information to connect to a database (NOTE if you are using another database you will have to set up the connection information in the GPVConnection table. If left blank it will default to the connection string previously configured in the web.config file.
- StoredProcedure β the name of the stored procedure that you just set up to call this data.
- SequenceNo β set this to a number to configure what order you would like this query to appear in your list of queries.
- Edit the GPVLayer table and set the KeyField to the map ID that you will be using in your query (i.e. if the layer is parcels the KeyField might be MAP_PAR_ID)
- You can also set the MaxNumberSelected and MaxAreaSelected if you have a really large dataset.
- Edit the GPVMapTabLayer table and set the AllowTarget field for the layer you are querying on to 1 for yes.
Setup a Data Tab
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure.
- Write your query using the Data Tab Stored Procedure as an example.
- Create the stored procedure.
- Test the stored procedure by running the procedure with a value.
- Edit the GPVDataTab table and enter the information for the minimum following fields.
- DataTabID β unique identifier to the data tab can be the same as the DisplayName.
- LayerID β the name of the LayerID from the GPVLayers table that this procedure will be using.
- DisplayName β how the name of the data tab should appear on the page.
- ConnectionID β contains the connection string information to connect to a database (NOTE if you are using another database you will have to set up the connection information in the GPVConnection table. If left blank it will default to the connection string previously configured in the web.config file.
- StoredProcedure β the name of the stored procedure that you just set up to call this data.
- SequenceNo β set this to a number to configure what order you would like this tab to appear if you have more than one data tabs.
Setup an Identify procedure
- The easiest way to get an identify procedure jump started is to use your existing Data Tab stored procedures.
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure.
- Write your query using the [Modularizing Stored Procedures|Modularizing Stored Procedures Page] as an example.
Note: For more information on the SQL syntax look for TransactSQL references on the internet.
Set up Proximity Tables
- Edit GPVProximity table and enter the information for the minimum following fields.
- ProximityID β unique ID used to identify the proximity option.
- DisplayName β how you would like the proximity selection text to appear in the dropdown list.
- SequenceNo β the number for the order in which this proximity setting will appear in the dropdown list.
- Distance β the distance to buffer the selection in map units
- IsDefault β specifies whether or not this is the default proximity setting in your dropdown list. If left null defaults to 1.
- Edit the GPVLayerProximity table and enter the information for the minimum following fields.
- ProximityID β the ID of the proximity buffer you are using.
- LayerID β the ID of the layer you are buffering
- Edit the GPVMapTabLayer table and set the AllowSelection field for the layer you are querying on to 1 for yes.
Note: Depending on what you are querying and how large the result set it you may want to set MinNearestDistance and MaxNearestDistance in the GPVLayer Table.
- Run the CheckConfiguration function to check your stored procedures and tables. Resolve any errors.
- Refresh the site using the website RefreshSite tool (www.yoursitename.com/RefreshSite.aspx?password=yourAdminPassword).
- Open your website and test.
Configuration of Layer Functions (Identify, Map Tip, Mailing Labels, Export) The GPV offers 4 different types of interactive functionality for working with layer data which is set in the GPVLayerFunction table in the function field. There 4 different function options are: identify; maptip; mailinglabel; and export. Each stored procedure will have to be edited to conform to the specific data in the layer with which you are working. Instructions and links for setting up each function are as follows.
Identify
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure.
- Write your query using the Identify Stored Procedure as an example.
- Create the stored procedure.
- Edit the GPVLayerFunction table.
- Set the Function field to identify.
- Set the StoredProc field to the name of the stored procedure you just created. *Run CheckConfiguration and RefreshSite. *Test the tool by clicking on the layer feature with the Identify tool in the map pane.
Map Tip
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure.
- Write your query using the Map Tip Stored Procedure as an example.
- Create the stored procedure.
- Edit the GPVLayerFunction table.
- Set the Function field to maptip.
- Set the StoredProc field to the name of the stored procedure you just created. *Run CheckConfiguration and RefreshSite. *Test the tool by hovering over the layer feature with the Identify tool in the map pane.
Mailing Labels
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure.
- Write your query using the Mailing Label Stored Procedure as an example. You need to choose which fields you would like to appear on your mailing labels. NOTE: Be careful with parcel data and make sure that you choose the correct address field if you are working with multiple address fields (i.e. parcel address vs. owner address).
- Create the stored procedure.
- Edit the GPVLayerFunction table.
- Set the Function field to mailinglabel.
- Set the StoredProc field to the name of the stored procedure you just created. *Run CheckConfiguration and RefreshSite. *Test the tool by clicking on the Mailing Labels link on the Selection Tab.
Export
- Open your SQL Manager.
- Navigate to your database and create a new stored procedure.
- Write your query using the Export Stored Procedure as an example. You need to choose which fields you would like to appear in your spreadsheet. NOTE: It is important that you alias your fields in your stored procedure. If you don't the field names will appear as they are in your database in your spreadsheet. NOTE: Be careful with parcel data and make sure that you choose the correct address field if you are working with multiple address fields (i.e. parcel address vs. owner address).
- Create the stored procedure.
- Edit the GPVLayerFunction table.
- Set the Function field to export.
- Set the StoredProc field to the name of the stored procedure you just created. *Run CheckConfiguration and RefreshSite. *Test the tool by clicking on the To SpreadSheet link on the Selection Tab.
Setup Legend Tab
- Edit the GPVApplication table for your current application and enter the information for the minimum following fields.
- FunctionTab = make sure that legend is one of the options entered. These options are comma separated if there is more than one.
Then do one of the following depending on various layer functionality configuration described in the following tables:
For individual layers that have added functionality:
- Edit the GPVMapTabLayer table for your current application and enter the information for the minimum following fields.
- ShowInLegend = enter a 1 for each field that you want to show in the legend.
or
For a group of layers that are part of the base map that are turned on for viewing purposes only: If you want all the layers in your base map to appear:
-
Edit the GPVMapTab table for your current application and enter the information for the minimum following fields.
- ShowBaseMapInLegend = enter a 1 to show all layers in base map in the legend. NOTE: A BaseMapID needs to be set in the GPVMapTab as well.
-
Run CheckConfiguration and RefreshSite.
-
Test the tool by clicking on the Legend Tab.
Setup Location Tab
- Create a separate .mxd of a locus map for the area with which you are working and set up a map service for it. This will most likely be your municipality.
- Edit the GPVMapTab table and enter the information for the minimum following fields.
- MapTabID = can be whatever you want this is for internal tabular use only
- DisplayName = how you would like this map to be titled in this instance of the GPV Application site
- MapHost = the name or IP of the machine that is hosting your ArcIMS map service
- MapService = the name of your map service
- DataFrame = if using an ArcMap service this can be set to a specific data frame if you have multiple data frames set up in the .mxd
- Edit the GPVApplication table for your current application and enter the information for the minimum following fields.
- FunctionTab = make sure that location is one of the options entered. These options are comma separated if there is more than one.
- OverviewMap = Set the MapTabID that you just configured in your GPVMapTab table.
- Run CheckConfiguration and RefreshSite.
- Test the tool by clicking on the Location Tab.
Setup Markup Tab Please note that there are no restrictions on allowing users access to your markup tab or adding markups to your maps. Users are allowed to add markups to whatever maps you make available for markup. If you are interested in limiting access to this tab to your employees only you will have to create two instances of the viewer one with markup for your intranet and one without markup for your internet.
- Edit the GPVMarkupCategory table and enter the information for the minimum following fields.
- CategoryID = can be whatever you want this is for internal tabular use only.
- DisplayName = enter a name that will appear for this markup category on the GPV Application site.
- Edit the GPVApplicationMarkupCategory table and enter the information for the minimum following fields.
- ApplicationID = enter the ApplicationID that corresponds to your application in the GPVApplication table
- CategoryID = enter the CategoryID for this markup that corresponds to the CategoryID entered in the GPVMarkupCategory table.
- SequenceNo = enter the sequence number for which you would like this markup to appear.
- Edit the GPVApplication table for your current application and enter the information or the minimum following fields.
- FunctionTab = make sure that markup is one of the options entered. These options are comma separated if there is more than one.
- Run CheckConfiguration and RefreshSite.
- Test the tool by clicking on the Markup Tab and adding a markup to the site.
- To access the data input by the Markup tab replace the CheckConfiguration in the URL with DownloadMarkup to extract markup information. NOTE: Markup Tab information is stored in a few different GPV tables. For more information on these tables see the Data Tables section of the Database Schema page.
Setting Up Zones