Changes between Version 46 and Version 47 of MapGuideRfc119


Ignore:
Timestamp:
08/03/11 22:20:20 (13 years ago)
Author:
samwang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc119

    v46 v47  
    34342. URL override setting. The URL defined in vector layer definition 2.3.0 is a string FDO exprerssion. This can be very flexible but also raises a problem. Consider a scenario that the URL element has been assigned the following FDO expression
    3535{{{
    36 Concat('map.google.com/fid=', FeatId)
     36Concat('http://map.google.com/fid=', FeatId)
    3737}}}
    38 where '!FeatId' property is the property to identify a unique feature of the feature class. So the URL of a feature in this layer should be in the form 'map.google.com/fid=[!FeatId]' where [!FeatId] part will be replaced with the actual '!FeatId' property value for each feature. However if user wants to change the URL of a specific feature(and only this one) which turns out to be 'map.bing.com/fid=[!FeatId]' for some reason. It is obvious that we can not change URL element value that will affect all other features. So what we can do is to specify a property of the feature class that the layer is based on where we can store this overriden value.
     38where '!FeatId' property is the property to identify a unique feature of the feature class. So the URL of a feature in this layer should be in the form 'map.google.com/fid=[!FeatId]' where [!FeatId] part will be replaced with the actual '!FeatId' property value for each feature. However if user wants to change the URL of a specific feature(and only this one) which turns out to be 'http://map.bing.com/fid=[!FeatId]' for some reason. It is obvious that we can not change URL element value that will affect all other features. So what we can do is to specify a property of the feature class that the layer is based on where we can store this overriden value.
    3939
    4040== Proposed Solution ==
     
    9393{{{
    9494<UrlData>
    95  <Content>Concat('map.google.com/location=', ADDRESS)</Content>
     95 <Content>Concat('http://map.google.com/location=', ADDRESS)</Content>
    9696 <Description>Concat('Feature at location:', ADDRESS)</Description>
    9797 <ContentOverride>URL</ContentOverride>
     
    101101
    102102
    103 Normally, if a feature does not individually override its layer's setting. Then the URL and description of this feature of should be the evaluated value of the FDO expression specified. That is to say, if the ADDRESS property value of this feature is "627 5th Avenue", then the URL of this feature is "map.google.com/location=627 5th Avenue" and respectively description of this feature is "'Feature at location: 627 5th Avenue". Otherwise if user want to use a different URL, he can override this value and store it in URL property and if he wants to use a different URL description, he can store it in DESCRIPTION property. Both overriden setttings(specified in "ContentOverride" and "DescriptionOverride" elements) take precedence over layer setting(specified in "Content" and "Description" elements).
     103Normally, if a feature does not individually override its layer's setting. Then the URL and description of this feature of should be the evaluated value of the FDO expression specified. That is to say, if the ADDRESS property value of this feature is "627 5th Avenue", then the URL of this feature is "http://map.google.com/location=627 5th Avenue" and respectively description of this feature is "'Feature at location: 627 5th Avenue". Otherwise if user want to use a different URL, he can override this value and store it in URL property and if he wants to use a different URL description, he can store it in DESCRIPTION property. Both overriden setttings(specified in "ContentOverride" and "DescriptionOverride" elements) take precedence over layer setting(specified in "Content" and "Description" elements).
    104104 
    105105