Skip to content

Commit

Permalink
Merge pull request #4 from jetthe/map_features
Browse files Browse the repository at this point in the history
Fixes #3870, #3881 and #3882
  • Loading branch information
systemed committed Jul 10, 2011
2 parents 8f86250 + df35788 commit b792b56
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 45 deletions.
4 changes: 3 additions & 1 deletion net/systemeD/halcyon/connection/actions/SetTagAction.as
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ package net.systemeD.halcyon.connection.actions {
public override function doAction():uint {
var tags:Object = entity.getTagsHash();
oldValue = tags[key];
if ( value == null || key == '' || oldValue != value ) {

if ( !( ( entity.getTag(key) == null ) && ( value == null && oldValue == null ) ) &&
( value == null || key == '' || oldValue != value ) ) {
if ( value == null || key == '' || value == '' )
delete tags[key];
else
Expand Down
7 changes: 7 additions & 0 deletions resources/map_features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ Quick documentation:
<input type="freetext" presence="always" name="Reference number" key="ref" description="A reference number or code used to identify this thing." />
</inputSet>

<inputSet id="simpleBrand">
<input type="freetext" category="Naming" presence="always" name="Brand" key="brand" description="Brand, i.e. Acme"/>
</inputSet>

<inputSet id="simpleOperator">
<input type="freetext" category="Naming" presence="always" name="Operator" key="operator" description="Operator, i.e. Acme Springfield Ltd"/>
</inputSet>

<inputSet id="source">
<input type="freetext" category="Misc" presence="onTagMatch" name="Source" key="source" description="The primary source of information for this object (GPS, survey, Yahoo, ...)" priority="lowest"/>
Expand Down
4 changes: 2 additions & 2 deletions resources/map_features/amenities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
<inputSet ref="common"/>
<inputSet ref="simpleName"/>
<input type="freetext" presence="always" name="Product" key="vending" description="What is being sold: tickets, food, maps..."/>
<input type="operator" presence="always" name="Operator" key="operator" description="Which company provides the service" />
<inputSet ref="simpleOperator"/>
</feature>

<!-- ========= Entertainment ========= -->
Expand Down Expand Up @@ -395,4 +395,4 @@
<inputSet ref="common"/>
</feature>

</featureGroup>
</featureGroup>
48 changes: 23 additions & 25 deletions resources/map_features/paths.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
<inputSet ref="path"/>
<inputSet ref="common"/>
<inputset ref="naming"/>
<input type="choice"
name="Cycleway type" category="Cycle" description="What kind of bike path is this?"
key="cycleway" presence="onTagMatch" priority="low">
<choice value="segregated" text="Segregated" description="Cyclists and pedestrians are separated by a painted line or kerb."/>
<choice value="shared" text="Shared" description="Cyclists and pedestrians share the full width of the path."/>
<input type="choice" name="Cycleway type" category="Cycle" description="What kind of bike path is this?" key="segregated" presence="onTagMatch" priority="low">
<choice value="yes" text="Segregated" description="Cyclists and pedestrians are separated by a painted line or kerb." />
<choice value="no" text="Shared" description="Cyclists and pedestrians share the full width of the path." />
</input>
</feature>

Expand Down Expand Up @@ -79,25 +77,25 @@
<inputSet ref="common"/>
</feature>

<feature name="Generic path">
<category>paths</category>
<icon image="features/paths__unofficial.png">
${name} <i>${ncn_ref} ${rcn_ref} ${lcn_ref} ${ref}</i>
</icon>
<help>http://wiki.openstreetmap.org/wiki/Tag:highway%3Dpath</help>

<line/>
<tag k="highway" v="path"/>
<inputSet ref="path"/>
<inputSet ref="common"/>
<inputset ref="naming"/>
</feature>

<feature name="Generic path">
<category>paths</category>
<icon image="features/paths__unofficial.png">
${name} <i>${ncn_ref} ${rcn_ref} ${lcn_ref} ${ref}</i>
</icon>
<help>http://wiki.openstreetmap.org/wiki/Tag:highway%3Dpath</help>

<line/>
<tag k="highway" v="path"/>
<inputSet ref="path"/>
<inputSet ref="common"/>
<inputset ref="naming"/>
</feature>


<!-- Bicycle routes -->
<feature name="National Cycle Network">
<category>paths</category>
<icon image="features/route__ncn.png" background="red" foreground="white">
<icon image="features/route__ncn.png" background="red" foreground="white">
<font size="14pt">
<b>${ref}</b>
</font>
Expand All @@ -107,7 +105,7 @@

<relation/>
<tag k="type" v="route"/>
<tag k="route" v="bicycle"/>
<tag k="route" v="bicycle"/>
<tag k="network" v="ncn"/>

<inputSet ref="route"/>
Expand All @@ -117,7 +115,7 @@

<feature name="Regional Cycle Network">
<category>paths</category>
<icon image="features/route__rcn.png" background="cyan" foreground="white">
<icon image="features/route__rcn.png" background="cyan" foreground="white">
<font size="14pt"><b>${ref}</b></font><br/>
<font size="12pt">${name}</font>
</icon>
Expand All @@ -144,7 +142,7 @@

<relation/>
<tag k="type" v="route"/>
<tag k="route" v="bicycle"/>
<tag k="route" v="bicycle"/>
<tag k="network" v="lcn"/>

<inputSet ref="route"/>
Expand All @@ -155,7 +153,7 @@

<feature name="Long Distance Path">
<category>paths</category>
<icon image="features/route__nwn.png" background="green" foreground="white">
<icon image="features/route__nwn.png" background="green" foreground="white">
<font size="14pt">
<b>${ref}</b>
</font>
Expand All @@ -171,4 +169,4 @@
<inputSet ref="common"/>
</feature>

</featureGroup>
</featureGroup>
62 changes: 45 additions & 17 deletions resources/map_features/transport.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,50 +352,78 @@


<feature name="Fuel">
<category>transport</category>
<point/>
<inputSet ref="simpleName"/>
<icon image="features/pois/transport_fuel.n.24.png"/>
<category>transport</category>
<point />
<inputSet ref="simpleName" />
<icon image="features/pois/transport_fuel.n.24.png" />
<tag k="amenity" v="fuel"/>
<input type="freetext" category="Naming" name="Operator" key="operator" description="The provider of the service"/>
<input type="choice" category="Fuels" name="Diesel" key="diesel" description="Is diesel fuel sold here?">
<inputSet ref="simpleBrand"/>
<inputSet ref="simpleOperator"/>

<input type="choice" category="Fuels" name="Diesel" key="fuel:diesel" description="Is diesel fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Octane 91" key="diesel" description="Is octane 91 unleaded fuel sold here?">
<input type="choice" category="Fuels" name="GTL Diesel" key="fuel:GTL_diesel" description="Is GTL diesel fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Octane 95" key="octane_95" description="Is octane 95 unleaded fuel sold here?">
<input type="choice" category="Fuels" name="HGV Diesel" key="fuel:HGV_diesel" description="Is HGV diesel fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Octane 98" key="octane_98" description="Is octane 98 unleaded fuel sold here?">
<input type="choice" category="Fuels" name="Biodiesel" key="fuel:biodiesel" description="Is biodiesel unleaded fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Octane 100" key="octane_100" description="Is octane 100 unleaded fuel sold here?">
<input type="choice" category="Fuels" name="Octane 91" key="fuel:octane_91" description="Is octane 91 unleaded fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Ethanol" key="ethanol" description="Is ethanol sold here?">
<input type="choice" category="Fuels" name="Octane 95" key="fuel:octane_95" description="Is octane 95 unleaded fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="LPG" key="lpg" description="Is LPG (liquid petroleum gas) sold here?">
<input type="choice" category="Fuels" name="Octane 98" key="fuel:octane_98" description="Is octane 98 unleaded fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Octane 91" key="diesel" description="Is octane 91 unleaded fuel sold here?">
<input type="choice" category="Fuels" name="Octane 100" key="fuel:octane_100" description="Is octane 100 unleaded fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Bio-diesel" key="biodiesel" description="Is biodiesel unleaded fuel sold here?">
<input type="choice" category="Fuels" name="Mixture 1:25" key="fuel:1_25" description="Is mixture 1:25 fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Mixture 1:50" key="fuel:1_50" description="Is mixture 1:50 fuel sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="E10" key="fuel:e10" description="Is E10 sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="E85" key="fuel:e85" description="Is E85 sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Biogas" key="fuel:biogas" description="Is biogas sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="CNG" key="fuel:cng" description="Is CNG sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="LPG" key="fuel:lpg" description="Is LPG sold here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>
<input type="choice" category="Fuels" name="Electricity" key="fuel:electricity" description="Is it possible to charge an electric car here?" priority="low">
<choice value="yes" text="Yes"/>
<choice value="no" text="No"/>
</input>


<inputSet ref="common"/>
</feature>

Expand Down Expand Up @@ -500,4 +528,4 @@
</feature>


</featureGroup>
</featureGroup>

0 comments on commit b792b56

Please sign in to comment.