''generates object for the specified MapServerLegendClass Private Function legendClass(ByVal lclass As MapServerLegendClass) As jcLegend Dim jcLeg As New jcLegend jcLeg.label = lclass.Label ''!--you may need the line below if you webserver return a image url that is not a ''fully(qualified) url address--! ''jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "calhalgis", "gis.calhouncounty.org") jcLeg.url = lclass.SymbolImage.ImageURL Return jcLeg End Function
''jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "helcom03.hcdomain1.local", "maps.helcom.fi")
Manolo,
In your restLegend.asmx web service application there is this function''generates object for the specified MapServerLegendClass Private Function legendClass(ByVal lclass As MapServerLegendClass) As jcLegend Dim jcLeg As New jcLegend jcLeg.label = lclass.Label ''!--you may need the line below if you webserver return a image url that is not a ''fully(qualified) url address--! ''jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "calhalgis", "gis.calhouncounty.org") jcLeg.url = lclass.SymbolImage.ImageURL Return jcLeg End Function
So in your case it would be''jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "helcom03.hcdomain1.local", "maps.helcom.fi")
webService.endpointURI = webService.endpointURI.replace("helcom03.hcdomain1.local","maps.helcom.fi");
<?xml version="1.0" encoding="utf-8" ?>
- <rLegend xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://gis.calhouncounty.org/">
<ServiceName>mapservices.ca</ServiceName>
- <Layers>
- <jLayers>
<layerId>0</layerId>
<layerName>FireSmartProperties</layerName>
<lMaxScale>0</lMaxScale>
<lMinScale>0</lMinScale>
- <clegend>
- <jcLegend>
<label>Low < 21</label>
<url>http://mapservicesca/arcgisoutput/_ags_leg3254af0347b4430d8113341652086cd7.png</url>
</jcLegend>
- <jcLegend>
<label>Moderate 21 - 29</label>
<url>http://mapservicesca/arcgisoutput/_ags_lega4e45e4d9c4346d9aeb54e360570816c.png</url>
</jcLegend>
- <jcLegend>
<label>High 30 - 35</label>
<url>http://mapservicesca/arcgisoutput/_ags_legeb089bbc1d9840f78c80a0b5e67ab36e.png</url>
</jcLegend>
- <jcLegend>
<label>Extreme > 35</label>
<url>http://mapservicesca/arcgisoutput/_ags_legc9efad23d0a147168d33433b67f26594.png</url>
</jcLegend>
</clegend>
</jLayers>
</Layers>
</rLegend>
Private Function legendClass(ByVal lclass As MapServerLegendClass) As jcLegend
Dim jcLeg As New jcLegend
jcLeg.label = lclass.Label
''!--you may need the line below if you webserver return a image url that is not a
''fully(qualified) url address--!
jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "mapservicesca", "mapservices.ca")
jcLeg.url = lclass.SymbolImage.ImageURL
Return jcLeg
End Function
''generates object for the specified MapServerLegendClass
PrivateFunction legendClass(ByVal lclass As MapServerLegendClass) As jcLegend
Dim jcLeg AsNew jcLegend
jcLeg.label = lclass.Label
''!--you may need the line below if you webserver return a image url that is not a
''fully(qualified) url address--!
jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "mapservicesca", "mapservices.ca")
jcLeg.url = lclass.SymbolImage.ImageURL
Return jcLeg
EndFunction