https://hms.amana-md.gov.sa/DiggLice/new_digg/index.html?Cord=565527.01,2708210.61,565572.39,2708247.95&DigID=87755&MapType=22&stg=0

Cord: Center of map - Input
DigID: Request ID for digging - Input
MapTaype: Type of Map - Provided by GIS; Fixed Number
stg: Stage; Status of Digging.. Red: New/Starting, Black, Green: Finish --- Change the color of line/polygon as per status of Stage in Map View

Stage Status:
1	  
2	 
3	 
4	 
5	  

Consuming of Map:
-----------------------------------------------------------------
Protected Sub imgbtnMap_Click(sender As Object, e As ImageClickEventArgs) Handles imgbtnMap.Click
        Dim DiggID As Integer = lblDiggID.Text
        dtCord = clsReqLice.rtv_Coordinates_By_DiggID(DiggID)
        If dtCord.Rows.Count > 0 Then

            Dim MapType As Integer = 22 ' Satellite Image , Line , Logo
            Dim Cord As String = dtCord.Rows(0).Item("Min(X)") & "," & dtCord.Rows(0).Item("Min(Y)") & "," & dtCord.Rows(0).Item("Max(X)") & "," & dtCord.Rows(0).Item("Max(Y)")
            'myIframe.Attributes("src") = "../../_map/_map.aspx?Cord=" & Cord & "&DigID=" & lblDiggID.Text & "&MapType=" & MapType
            myIframe.Attributes("src") = "../../new_digg/index.html?Cord=" & Cord & "&DigID=" & lblDiggID.Text & "&MapType=" & MapType & "&stg=0"
            trMap.Visible = True
            trbtnMap.Visible = False
        Else
            HelpClass.AlertMessage(Me, "      ")
        End If
    End Sub




--------------------------------------------------------------------
Digging Type:
1	 
2	
3	
4	
5	 
6	
7	
8	 
9	
10	 
11	 
12	 
13	 


By default Layers:
Basemap
Digging Layer
Tanzeem

Map Component:
Written in Openlayer with geoserver
Need to send email to Akram, sami to get 
1- the code for more details
2- Consuming of Map.
3- Stage Status.
4- Digging Type.
5- Add new dig request in GIS - Class name: daban
6- code for Trigger to update/edit the dig request


Flow of Execution:

User selects dig request
Detail opens in new page
user clicks on map icon
Iframe loads the map.


New Dig Request in GIS:
Dig_Digitize(DiggID, DiggNo, Parts, ProjNo, ServTypeID, DiggAddDate, ContID, StartDate, EndDate, DiggStatID, StreetNo, DiggAsphaltLenth, _
                    DiggSoilLenth, DiggPavementLenth, DiggTotalLenth, DiggWidth, DiggDepth, DiggDuration, DiggStage, MuniID, RegiID, DistID, StagID)

Input Params: 
DiggID, DiggNo, Parts, ProjNo, ServTypeID, DiggAddDate, ContID, StartDate, EndDate, DiggStatID, StreetNo, DiggAsphaltLenth, DiggSoilLenth, DiggPavementLenth, DiggTotalLenth, DiggWidth, DiggDepth, DiggDuration, DiggStage, MuniID, RegiID, DistID, StagID



Update Layer table
madgis.DIGG_PERMITS
madgis.DIGG_LOGO

Output:
manis ID
Region ID
Dist ID

Add Flow:
Input Params -> Create Lines/ploygon in GIS (Digg Permit, Digg_logo -> Return ManID/RegID/DistID

Edit Digg Req:

Trigger to update the following fields in GIS based on DigID

Start_Date
End_Date
Status
Street_No

--------------------------------------------------------------
     UPDATE MADGIS.Digg_Permits SET     Start_Date =  :NEW.DIGG_START_DATE,

                                         End_Date   =  :NEW.DIGG_END_DATE,
                                         Status     =  :NEW.DIGG_STAT_ID,
                                         Street_No  =  :NEW.DIGG_STREET_ID
                                 WHERE Dig_id  =     :NEW.DIGG_ID;
-----------------------




