Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2012-08-10 10:13:56 +02:00
commit 2b11468302
21 changed files with 442 additions and 969 deletions

View file

@ -1,627 +0,0 @@
<osmand_types>
<!-- hm rendering types for all-purpose-renderer, v002. Changes synced with rendering_types.xml as contained in master 2011-06-27 -->
<!-- 3 different types for polygon="true" that object will be rendered as polygon, polyline ="true" as line, point ="true" - as point -->
<!-- You can combine any 3 types. -->
<!-- building="true" means that object will be rendered as polygon (default building) + center point icon -->
<!-- Restrictions of types format. -->
<!-- 1) 31 (5 bytes) maximum number of different types -->
<!-- 2) In each type only 31 (5 bytes) different polyline and polygon (in sum) subtypes available. -->
<!-- 3) In each type only 127 (7 bytes) all different subtypes available -->
<!-- TODO Try to not change id of types and subtypes, some of the constants are hardcoded (for rendering order, rendering). -->
<type name="highway" id="1">
<subtype id="2" polyline="true" tag="highway" value="motorway" minzoom="5" />
<subtype id="2" polyline="true" tag="highway" value="motorway_link" minzoom="5" />
<subtype id="1" polyline="true" tag="highway" value="trunk" minzoom="5" />
<subtype id="1" polyline="true" tag="highway" value="trunk_link" minzoom="5" />
<subtype id="3" polyline="true" tag="highway" value="primary" minzoom="7" />
<subtype id="3" polyline="true" tag="highway" value="primary_link" minzoom="7" />
<subtype id="4" polyline="true" tag="highway" value="secondary" minzoom="9" />
<subtype id="4" polyline="true" tag="highway" value="secondary_link" minzoom="9" />
<subtype id="5" polyline="true" tag="highway" value="tertiary" minzoom="10" />
<subtype id="6" polygon="true" polyline="true" tag="highway" value="residential" minzoom="12" />
<subtype id="7" polygon="true" polyline="true" tag="highway" value="service" minzoom="13" />
<subtype id="8" polyline="true" tag="highway" value="unclassified" minzoom="12" />
<subtype id="8" polyline="true" tag="highway" value="road" minzoom="12" />
<subtype id="9" polyline="true" tag="highway" value="track" minzoom="12" />
<subtype id="10" polyline="true" tag="highway" value="path" minzoom="12" />
<subtype id="11" polyline="true" tag="highway" value="living_street" minzoom="12" />
<subtype id="16" polygon="true" polyline="true" tag="highway" value="pedestrian" minzoom="13" />
<subtype id="17" polyline="true" tag="highway" value="cycleway" minzoom="12" />
<subtype id="18" polyline="true" tag="highway" value="byway" minzoom="12" />
<subtype id="19" polyline="true" tag="highway" value="footway" minzoom="12" />
<subtype id="20" polyline="true" tag="highway" value="steps" minzoom="14" />
<subtype id="21" polyline="true" tag="highway" value="bridleway" minzoom="12" />
<subtype id="22" polygon="true" point="true" tag="highway" value="services" minzoom="12" />
<!-- <subtype id="" polyline="true" tag="highway" value="bus_guideway" minzoom="15" /> -->
<subtype id="23" polyline="true" point="true" tag="highway" value="ford" minzoom="14" />
<subtype id="25" polyline="true" tag="highway" value="construction" minzoom="14" />
<subtype id="26" polyline="true" tag="highway" value="proposed" minzoom="15" />
<!-- POINT SUBTYPES -->
<subtype id="35" point="true" tag="highway" value="mini_roundabout" minzoom="15" />
<subtype id="36" point="true" tag="highway" value="stop" minzoom="15" />
<subtype id="37" point="true" tag="highway" value="give_way" minzoom="15" />
<subtype id="38" point="true" tag="highway" value="traffic_signals" minzoom="15" />
<subtype id="39" point="true" tag="highway" value="motorway_junction" minzoom="15" />
<subtype id="40" point="true" tag="highway" value="bus_stop" minzoom="15" />
<subtype id="41" point="true" tag="highway" value="platform" minzoom="15" />
<subtype id="42" point="true" tag="highway" value="turning_circle" minzoom="15" />
<subtype id="43" point="true" tag="highway" value="emergency_access_point" minzoom="15" />
<subtype id="44" point="true" tag="highway" value="speed_camera" minzoom="15" />
<subtype id="45" point="true" tag="highway" value="street_lamp" minzoom="15" />
<subtype id="50" point="true" tag="traffic_calming" value="yes" minzoom="15" />
<subtype id="51" point="true" tag="traffic_calming" value="bump" minzoom="15" />
<subtype id="52" point="true" tag="traffic_calming" value="chicane" minzoom="15" />
<subtype id="53" point="true" tag="traffic_calming" value="cushion" minzoom="15" />
<subtype id="54" point="true" tag="traffic_calming" value="hump" minzoom="15" />
<subtype id="55" point="true" tag="traffic_calming" value="rumble_strip" minzoom="15" />
<subtype id="56" point="true" tag="traffic_calming" value="table" minzoom="15" />
<subtype id="57" point="true" tag="traffic_calming" value="choker" minzoom="15" />
<subtype id="58" point="true" tag="traffic_calming" minzoom="15" />
</type>
<type id="2" name="barrier">
<subtype id="1" polyline="true" tag="barrier" value="hedge" minzoom="15" />
<subtype id="1" polyline="true" tag="natural" value="hedge" minzoom="15" />
<subtype id="2" polyline="true" tag="barrier" value="fence" minzoom="15" />
<subtype id="2" polyline="true" tag="fenced" value="yes" minzoom="15" />
<subtype id="3" polyline="true" tag="barrier" value="wall" minzoom="15" />
<subtype id="1" polyline="true" tag="barrier" value="ditch" minzoom="15" />
<subtype id="4" polyline="true" tag="barrier" value="retaining_wall" minzoom="15" />
<subtype id="5" polyline="true" tag="barrier" value="city_wall" minzoom="13" />
<subtype id="5" polyline="true" tag="historic" value="city_walls" minzoom="13" />
<subtype id="6" point="true" polyline="true" tag="barrier" value="bollard" minzoom="15" />
<subtype id="16" point="true" tag="barrier" value="cycle_barrier" minzoom="15" />
<subtype id="17" point="true" tag="barrier" value="block" minzoom="15" />
<subtype id="18" point="true" tag="barrier" value="cattle_grid" minzoom="15" />
<subtype id="19" point="true" tag="barrier" value="toll_booth" minzoom="15" />
<subtype id="20" point="true" tag="barrier" value="entrance" minzoom="15" />
<subtype id="21" point="true" tag="barrier" value="gate" minzoom="15" />
<subtype id="21" point="true" tag="highway" value="gate" minzoom="15" />
<subtype id="22" point="true" tag="barrier" value="lift_gate" minzoom="15" />
<subtype id="23" point="true" tag="barrier" value="stile" minzoom="15" />
<subtype id="24" point="true" tag="barrier" value="horse_stile" minzoom="15" />
<subtype id="25" point="true" tag="barrier" value="kissing_gate" minzoom="15" />
<subtype id="26" point="true" tag="barrier" value="sally_port" minzoom="15" />
<subtype id="27" point="true" tag="barrier" value="turnstile" minzoom="15" />
<subtype id="28" point="true" tag="barrier" value="kent_carriage_gap" minzoom="15" />
</type>
<type id="3" name="waterway">
<subtype id="1" polyline="true" tag="waterway" value="stream" minzoom="13" />
<subtype id="3" polygon="true" tag="waterway" value="riverbank" minzoom="8" />
<subtype id="2" polyline="true" tag="waterway" value="river" minzoom="5" />
<subtype id="4" polyline="true" tag="waterway" value="canal" minzoom="9" />
<subtype id="5" polyline="true" tag="waterway" value="ditch" minzoom="13" />
<subtype id="6" polyline="true" tag="waterway" value="drain" minzoom="13" />
<subtype id="7" point="true" polygon_center="true" tag="waterway" value="dock" minzoom="10" />
<subtype id="8" point="true" tag="waterway" value="lock_gate" minzoom="15" />
<subtype id="8" point="true" tag="waterway" value="lock" minzoom="15" />
<subtype id="9" point="true" tag="waterway" value="turning_point" minzoom="15" />
<subtype id="10" point="true" tag="waterway" value="boatyard" minzoom="15" />
<subtype id="11" point="true" polyline="true" tag="waterway" value="weir" minzoom="15" />
<subtype id="12" polyline="true" tag="waterway" value="dam" minzoom="13" />
<subtype id="13" point="true" polygon_center="true" tag="waterway" value="mill_pond" minzoom="13" />
</type>
<type id="4" name="railway">
<subtype id="1" polyline="true" tag="railway" value="rail" minzoom="7" />
<subtype id="2" polyline="true" tag="railway" value="tram" minzoom="13" />
<subtype id="3" polyline="true" tag="railway" value="light_rail" minzoom="13" />
<subtype id="4" polyline="true" tag="railway" value="abandoned" minzoom="15" />
<subtype id="5" polyline="true" tag="railway" value="disused" minzoom="15" />
<subtype id="6" polyline="true" tag="railway" value="subway" minzoom="13" />
<subtype id="7" polyline="true" tag="railway" value="preserved" minzoom="13" />
<subtype id="8" polyline="true" tag="railway" value="narrow_gauge" minzoom="15" />
<subtype id="9" polyline="true" tag="railway" value="construction" minzoom="15" />
<subtype id="10" polyline="true" tag="railway" value="monorail" minzoom="15" />
<subtype id="11" polyline="true" tag="railway" value="funicular" minzoom="15" />
<subtype id="12" polyline="true" tag="railway" value="platform" minzoom="15" />
<subtype id="13" point="true" polygon_center="true" tag="railway" value="station" minzoom="12" />
<subtype id="14" point="true" tag="railway" value="turntable" minzoom="15" />
<subtype id="22" point="true" tag="railway" value="halt" minzoom="15" />
<subtype id="23" point="true" tag="railway" value="tram_stop" minzoom="15" />
<subtype id="24" point="true" tag="railway" value="crossing" minzoom="15" />
<subtype id="25" point="true" tag="railway" value="level_crossing" minzoom="15" />
<subtype id="26" point="true" tag="railway" value="subway_entrance" minzoom="15" />
<subtype id="27" point="true" tag="railway" value="buffer_stop" minzoom="15" />
</type>
<type id="5" name="aeroway">
<subtype id="1" point="true" polygon_center="true" tag="aeroway" value="aerodrome" minzoom="12" />
<subtype id="2" point="true" polygon_center="true" tag="aeroway" value="terminal" minzoom="15" />
<subtype id="3" point="true" polygon_center="true" tag="aeroway" value="helipad" minzoom="12" />
<subtype id="7" polyline="true" tag="aeroway" value="runway" minzoom="11" />
<subtype id="8" polyline="true" tag="aeroway" value="taxiway" minzoom="12" />
<subtype id="9" polygon="true" tag="aeroway" value="apron" minzoom="12" />
<subtype id="10" point="true" polygon_center="true" tag="aeroway" value="airport" minzoom="11" />
<subtype id="12" point="true" tag="aeroway" value="gate" minzoom="15" nameNullTag="ref"/>
<subtype id="13" point="true" tag="aeroway" value="windsock" minzoom="15" />
</type>
<type id="6" name="aerialway">
<subtype id="1" polyline="true" tag="aerialway" value="cable_car" minzoom="13" />
<subtype id="2" polyline="true" tag="aerialway" value="gondola" minzoom="13" />
<subtype id="3" polyline="true" tag="aerialway" value="chair_lift" minzoom="13" />
<subtype id="4" polyline="true" tag="aerialway" value="mixed_lift" minzoom="13" />
<subtype id="5" polyline="true" tag="aerialway" value="drag_lift" minzoom="13" />
<subtype id="6" polyline="true" tag="aerialway" value="goods" minzoom="15" />
<subtype id="7" building="true" tag="aerialway" value="station" minzoom="15" />
<subtype id="8" point="true" tag="aerialway" value="pylon" minzoom="15" />
<subtype id="9" polyline="true" tag="aerialway" value="goods" minzoom="15" />
</type>
<type id="7" name="power">
<subtype id="1" point="true" tag="power" value="tower" minzoom="13" />
<subtype id="2" point="true" tag="power" value="pole" minzoom="15" />
<subtype id="3" polyline="true" tag="power" value="line" minzoom="13" />
<subtype id="4" polyline="true" tag="power" value="minor_line" minzoom="15" />
<subtype id="5" point="true" polygon="true" tag="power" value="station" minzoom="13" />
<subtype id="6" point="true" polygon="true" tag="power" value="sub_station" minzoom="13" />
<subtype id="7" point="true" tag="power" value="generator" minzoom="15" />
<subtype id="8" point="true" tag="power" value="cable_distribution_cabinet" minzoom="15" />
</type>
<type id="8" name="man_made">
<subtype id="1" polygon="true" tag="building" value="yes" minzoom="15" />
<subtype id="1" polygon="true" tag="building" minzoom="15" />
<subtype id="2" point="true" polygon="true" tag="man_made" value="wastewater_plant" minzoom="15" />
<subtype id="3" building="true" tag="man_made" value="water_works" minzoom="15" />
<subtype id="4" point="true" polygon="true" tag="man_made" value="works" minzoom="15" />
<subtype id="5" polygon="true" tag="building" value="garages" minzoom="15" />
<subtype id="7" polyline="true" tag="man_made" value="cutline" minzoom="15" />
<subtype id="8" polyline="true" tag="man_made" value="groyne" minzoom="13" />
<subtype id="8" polyline="true" tag="man_made" value="breakwater" minzoom="13" />
<subtype id="9" polyline="true" tag="man_made" value="pier" minzoom="13" />
<subtype id="10" polyline="true" tag="man_made" value="pipeline" minzoom="15" />
<subtype id="11" polygon="true" tag="man_made" value="reservoir_covered" minzoom="15" />
<subtype id="12" polyline="true" tag="man_made" value="embankment" minzoom="15" />
<subtype id="15" point="true" tag="man_made" value="beacon" minzoom="15" />
<subtype id="16" point="true" tag="man_made" value="crane" minzoom="15" />
<subtype id="17" point="true" tag="man_made" value="lighthouse" minzoom="15" />
<subtype id="18" point="true" tag="man_made" value="mineshaft" minzoom="15" />
<subtype id="19" point="true" tag="man_made" value="adit" minzoom="15" />
<subtype id="20" point="true" tag="man_made" value="petroleum_well" minzoom="15" />
<subtype id="21" point="true" tag="man_made" value="surveillance" minzoom="15" />
<subtype id="22" point="true" tag="man_made" value="survey_point" minzoom="15" />
<subtype id="23" point="true" tag="man_made" value="tower" minzoom="15" />
<subtype id="24" point="true" tag="man_made" value="watermill" minzoom="15" />
<subtype id="25" point="true" tag="man_made" value="water_tower" minzoom="15" />
<subtype id="26" point="true" tag="man_made" value="water_well" minzoom="15" />
<subtype id="27" point="true" tag="man_made" value="windmill" minzoom="15" />
</type>
<type id="9" name="leisure">
<subtype id="1" point="true" polygon="true" tag="leisure" value="dog_park" minzoom="15" />
<subtype id="2" point="true" polygon="true" tag="leisure" value="sports_centre" minzoom="13" />
<subtype id="3" point="true" polygon="true" tag="leisure" value="golf_course" minzoom="12" />
<subtype id="4" point="true" polygon="true" tag="leisure" value="stadium" minzoom="13" />
<subtype id="5" polyline="true" polygon="true" tag="leisure" value="track" minzoom="12" />
<subtype id="6" point="true" polygon="true" tag="leisure" value="pitch" minzoom="12" />
<subtype id="7" point="true" polygon="true" tag="leisure" value="water_park" minzoom="13" />
<subtype id="8" point="true" polyline="true" tag="leisure" value="marina" minzoom="13" />
<subtype id="9" point="true" polygon="true" tag="leisure" value="slipway" minzoom="15" />
<subtype id="10" point="true" polygon="true" tag="leisure" value="fishing" minzoom="15" />
<subtype id="11" point="true" polygon="true" tag="leisure" value="nature_reserve" minzoom="10" />
<subtype id="12" point="true" polygon="true" tag="natural" value="park" minzoom="12" />
<subtype id="12" point="true" polygon="true" tag="leisure" value="park" minzoom="12" />
<subtype id="12" point="true" polygon="true" tag="leisure" value="recreation_ground" minzoom="12" />
<subtype id="13" point="true" polygon="true" tag="leisure" value="playground" minzoom="15" />
<subtype id="14" point="true" polygon="true" tag="leisure" value="garden" minzoom="12" />
<subtype id="15" point="true" polygon="true" tag="leisure" value="common" minzoom="12" />
<subtype id="16" point="true" polygon="true" tag="leisure" value="ice_rink" minzoom="15" />
<subtype id="17" point="true" polygon="true" tag="leisure" value="miniature_golf" minzoom="15" />
<subtype id="18" point="true" polygon="true" tag="leisure" value="dance" minzoom="15" />
</type>
<type id="10" name="office">
<subtype id="5" point="true" tag="office" value="accountant" minzoom="15" />
<subtype id="6" point="true" tag="office" value="architect" minzoom="15" />
<subtype id="7" point="true" tag="office" value="company" minzoom="15" />
<subtype id="8" point="true" tag="office" value="employment_agency" minzoom="15" />
<subtype id="9" point="true" tag="office" value="estate_agent" minzoom="15" />
<subtype id="10" point="true" tag="office" value="government" minzoom="15" />
<subtype id="11" point="true" tag="office" value="insurance" minzoom="15" />
<subtype id="12" point="true" tag="office" value="it" minzoom="15" />
<subtype id="13" point="true" tag="office" value="lawyer" minzoom="15" />
<subtype id="14" point="true" tag="office" value="ngo" minzoom="15" />
<subtype id="15" point="true" tag="office" value="quango" minzoom="15" />
<subtype id="16" point="true" tag="office" value="research" minzoom="15" />
<subtype id="17" point="true" tag="office" value="telecommunication" minzoom="15" />
<subtype id="18" point="true" tag="office" value="travel_agent" minzoom="15" />
<subtype id="19" point="true" tag="amenity" value="architect_office" minzoom="15" />
</type>
<type id="11" name="shop">
<subtype id="41" point="true" tag="shop" value="alcohol" minzoom="15" />
<subtype id="42" point="true" tag="shop" value="bakery" minzoom="15" />
<subtype id="43" point="true" tag="shop" value="beauty" minzoom="15" />
<subtype id="44" point="true" tag="shop" value="beverages" minzoom="15" />
<subtype id="45" point="true" tag="shop" value="bicycle" minzoom="15" />
<subtype id="46" point="true" tag="shop" value="books" minzoom="15" />
<subtype id="47" point="true" tag="shop" value="boutique" minzoom="15" />
<subtype id="48" point="true" tag="shop" value="butcher" minzoom="15" />
<subtype id="49" point="true" tag="shop" value="car" minzoom="15" />
<subtype id="50" point="true" tag="shop" value="car_repair" minzoom="15" />
<subtype id="11" point="true" tag="shop" value="charity" minzoom="15" />
<subtype id="12" point="true" tag="shop" value="chemist" minzoom="15" />
<subtype id="13" point="true" tag="shop" value="clothes" minzoom="15" />
<subtype id="13" point="true" tag="shop" value="fashion" minzoom="15" />
<subtype id="14" point="true" tag="shop" value="computer" minzoom="15" />
<subtype id="15" point="true" tag="shop" value="confectionery" minzoom="15" />
<subtype id="16" point="true" tag="shop" value="convenience" minzoom="15" />
<subtype id="17" point="true" tag="shop" value="department_store" minzoom="15" />
<subtype id="18" point="true" tag="shop" value="dry_cleaning" minzoom="15" />
<subtype id="19" point="true" tag="shop" value="doityourself" minzoom="15" />
<subtype id="20" point="true" tag="shop" value="electronics" minzoom="15" />
<subtype id="21" point="true" tag="shop" value="fabrics" minzoom="15" />
<subtype id="22" point="true" tag="shop" value="farm" minzoom="15" />
<subtype id="23" point="true" tag="shop" value="florist" minzoom="15" />
<subtype id="24" point="true" tag="shop" value="funeral_directors" minzoom="15" />
<subtype id="25" point="true" tag="shop" value="furniture" minzoom="15" />
<subtype id="26" point="true" tag="shop" value="garden_centre" minzoom="15" />
<subtype id="27" point="true" tag="shop" value="general" minzoom="15" />
<subtype id="28" point="true" tag="shop" value="gift" minzoom="15" />
<subtype id="29" point="true" tag="shop" value="glaziery" minzoom="15" />
<subtype id="30" point="true" tag="shop" value="greengrocer" minzoom="15" />
<subtype id="31" point="true" tag="shop" value="hairdresser" minzoom="15" />
<subtype id="32" point="true" tag="shop" value="hardware" minzoom="15" />
<subtype id="33" point="true" tag="shop" value="hearing_aids" minzoom="15" />
<subtype id="34" point="true" tag="shop" value="hifi" minzoom="15" />
<subtype id="35" point="true" tag="shop" value="ice_cream" minzoom="15" />
<subtype id="40" point="true" tag="shop" value="jewelry" minzoom="15" />
<subtype id="51" point="true" tag="shop" value="kiosk" minzoom="15" />
<subtype id="52" point="true" tag="shop" value="laundry" minzoom="15" />
<subtype id="53" point="true" tag="shop" value="mall" minzoom="15" />
<subtype id="54" point="true" tag="shop" value="massage" minzoom="15" />
<subtype id="55" point="true" tag="shop" value="money_lender" minzoom="15" />
<subtype id="56" point="true" tag="shop" value="motorcycle" minzoom="15" />
<subtype id="57" point="true" tag="shop" value="newsagent" minzoom="15" />
<subtype id="58" point="true" tag="shop" value="optician" minzoom="15" />
<subtype id="59" point="true" tag="shop" value="organic" minzoom="15" />
<subtype id="60" point="true" tag="shop" value="outdoor" minzoom="15" />
<subtype id="61" point="true" tag="shop" value="pawnbroker" minzoom="15" />
<subtype id="62" point="true" tag="shop" value="second_hand" minzoom="15" />
<subtype id="63" point="true" tag="shop" value="sports" minzoom="15" />
<subtype id="64" point="true" tag="shop" value="stationery" minzoom="15" />
<subtype id="65" point="true" tag="shop" value="supermarket" minzoom="15" />
<subtype id="66" point="true" tag="shop" value="shoes" minzoom="15" />
<subtype id="67" point="true" tag="shop" value="tattoo" minzoom="15" />
<subtype id="68" point="true" tag="shop" value="toys" minzoom="15" />
<subtype id="69" point="true" tag="shop" value="travel_agency" minzoom="15" />
<subtype id="70" point="true" tag="shop" value="variety_store" minzoom="15" />
<subtype id="71" point="true" tag="shop" value="video" minzoom="15" />
<subtype id="75" point="true" tag="shop" minzoom="15" />
</type>
<type id="12" name="emergency">
<subtype id="1" building="true" tag="emergency" value="ambulance_station" minzoom="15" />
<subtype id="2" building="true" tag="emergency" value="ses_station" minzoom="15" />
<subtype id="3" point="true" tag="emergency" value="fire_extinguisher" minzoom="15" />
<subtype id="4" point="true" tag="emergency" value="fire_flapper" minzoom="15" />
<subtype id="5" point="true" tag="emergency" value="fire_hose" minzoom="15" />
<subtype id="6" point="true" tag="emergency" value="fire_hydrant" minzoom="15" />
<subtype id="7" point="true" tag="emergency" value="phone" minzoom="15" />
<subtype id="9" point="true" tag="emergency" value="siren" minzoom="15" />
<subtype id="10" point="true" tag="amenity" value="fire_station" minzoom="15" />
</type>
<type id="13" name="tourism">
<subtype id="2" point="true" polygon="true" tag="tourism" value="attraction" minzoom="13" />
<subtype id="3" point="true" polygon="true" tag="tourism" value="artwork" minzoom="15" />
<subtype id="4" point="true" polygon="true" tag="tourism" value="camp_site" minzoom="13" />
<subtype id="5" point="true" polygon="true" tag="tourism" value="caravan_site" minzoom="13" />
<subtype id="6" point="true" polygon="true" tag="tourism" value="picnic_site" minzoom="13" />
<subtype id="7" point="true" polygon="true" tag="tourism" value="theme_park" minzoom="12" />
<subtype id="8" point="true" polygon="true" tag="tourism" value="zoo" minzoom="12" />
<subtype id="9" building="true" tag="tourism" value="alpine_hut" minzoom="14" />
<subtype id="10" building="true" tag="tourism" value="chalet" minzoom="15" />
<subtype id="11" building="true" tag="tourism" value="guest_house" minzoom="15" />
<subtype id="12" building="true" tag="tourism" value="hostel" minzoom="15" />
<subtype id="13" building="true" tag="tourism" value="hotel" minzoom="15" />
<subtype id="14" building="true" tag="tourism" value="motel" minzoom="15" />
<subtype id="15" building="true" tag="tourism" value="museum" minzoom="15" />
<subtype id="16" point="true" tag="tourism" value="information" minzoom="15" />
<subtype id="17" point="true" tag="tourism" value="viewpoint" minzoom="15" />
<subtype id="18" point="true" tag="tourism" minzoom="15" />
</type>
<type id="14" name="historic">
<subtype id="1" point="true" polygon="true" tag="historic" value="archaeological_site" minzoom="15" />
<subtype id="2" point="true" polygon="true" tag="historic" value="battlefield" minzoom="15" />
<subtype id="4" point="true" polygon="true" tag="historic" value="castle" minzoom="15" />
<subtype id="5" point="true" polygon="true" tag="historic" value="fort" minzoom="15" />
<subtype id="8" point="true" polygon="true" tag="historic" value="ruins" minzoom="15" />
<subtype id="7" building="true" tag="historic" value="monument" minzoom="15" />
<subtype id="3" point="true" tag="historic" value="boundary_stone" minzoom="15" />
<subtype id="6" point="true" tag="historic" value="memorial" minzoom="15" />
<subtype id="9" point="true" tag="historic" value="wayside_cross" minzoom="15" />
<subtype id="10" point="true" tag="historic" value="wayside_shrine" minzoom="15" />
<subtype id="11" point="true" tag="historic" value="wreck" minzoom="15" />
<subtype id="12" point="true" tag="historic" minzoom="15" />
</type>
<type id="15" name="landuse">
<subtype id="1" polygon="true" tag="landuse" value="allotments" minzoom="10" />
<subtype id="2" point="true" polygon="true" tag="landuse" value="basin" minzoom="10" />
<subtype id="3" point="true" polygon="true" tag="landuse" value="brownfield" minzoom="12" />
<subtype id="4" polygon="true" tag="landuse" value="cemetery" minzoom="12" />
<subtype id="4" polygon="true" tag="landuse" value="grave_yard" minzoom="15" />
<subtype id="5" polygon="true" tag="landuse" value="commercial" minzoom="10" />
<subtype id="6" point="true" polygon="true" tag="landuse" value="construction" minzoom="12" />
<subtype id="7" polygon="true" tag="landuse" value="farm" minzoom="12" />
<subtype id="7" polygon="true" tag="landuse" value="farmland" minzoom="12" />
<subtype id="9" polygon="true" tag="landuse" value="farmyard" minzoom="12" />
<subtype id="10" polygon="true" tag="landuse" value="forest" minzoom="10" />
<subtype id="11" polygon="true" tag="landuse" value="garages" minzoom="12" />
<subtype id="12" polygon="true" tag="landuse" value="grass" minzoom="12" />
<subtype id="13" polygon="true" tag="landuse" value="greenfield" minzoom="12" />
<subtype id="14" polygon="true" tag="landuse" value="greenhouse_horticulture" minzoom="12" />
<subtype id="15" polygon="true" tag="landuse" value="industrial" minzoom="10" />
<subtype id="16" polygon="true" tag="landuse" value="landfill" minzoom="12" />
<subtype id="17" point="true" polygon="true" tag="landuse" value="meadow" minzoom="12" />
<subtype id="18" polygon="true" tag="landuse" value="military" minzoom="10" />
<subtype id="19" polygon="true" tag="landuse" value="orchard" minzoom="12" />
<subtype id="20" polygon="true" tag="landuse" value="railway" minzoom="12" />
<subtype id="21" polygon="true" tag="landuse" value="recreation_ground" minzoom="12" />
<subtype id="21" polygon="true" tag="landuse" value="conservation" minzoom="10" />
<subtype id="21" polygon="true" tag="landuse" value="village_green" minzoom="12" />
<subtype id="22" point="true" polygon="true" tag="landuse" value="reservoir" minzoom="7" />
<subtype id="22" point="true" polygon="true" tag="landuse" value="water" minzoom="7" />
<subtype id="23" polygon="true" tag="landuse" value="residential" minzoom="10" />
<subtype id="24" polygon="true" tag="landuse" value="retail" minzoom="12" />
<subtype id="25" point="true" polygon="true" tag="landuse" value="salt_pond" minzoom="10" />
<subtype id="26" point="true" polygon="true" tag="landuse" value="quarry" minzoom="12" />
<subtype id="27" polygon="true" tag="landuse" value="vineyard" minzoom="12" />
<subtype id="28" polygon="true" tag="landuse" value="field" minzoom="12" />
<subtype id="28" polygon="true" tag="natural" value="field" minzoom="12" />
</type>
<type id="16" name="military">
<subtype id="1" point="true" polygon_center="true" tag="military" value="airfield" minzoom="12" />
<subtype id="2" point="true" polygon_center="true" tag="military" value="bunker" minzoom="15" />
<subtype id="3" polygon="true" tag="military" value="barracks" minzoom="12" />
<subtype id="4" point="true" polygon_center="true" tag="military" value="danger_area" minzoom="10" />
<subtype id="5" point="true" polygon="true" tag="military" value="range" minzoom="10" />
<subtype id="6" point="true" polygon="true" tag="military" value="naval_base" minzoom="12" />
<subtype id="7" point="true" polygon="true" tag="military" minzoom="12" />
</type>
<type id="17" name="natural">
<subtype id="5" polygon="true" tag="natural" value="coastline" minzoom="1" />
<subtype id="1" point="true" polygon="true" tag="natural" value="bay" minzoom="11" />
<subtype id="2" point="true" polygon="true" tag="natural" value="beach" minzoom="11" />
<subtype id="3" point="true" polygon_center="true" tag="natural" value="cave_entrance" minzoom="15" />
<subtype id="4" point="true" polyline="true" tag="natural" value="cliff" minzoom="13" />
<subtype id="6" point="true" polygon="true" tag="natural" value="fell" minzoom="13" />
<subtype id="7" point="true" polygon="true" tag="natural" value="glacier" minzoom="10" />
<subtype id="8" point="true" polygon="true" tag="natural" value="heath" minzoom="11" />
<subtype id="9" point="true" polygon="true" tag="natural" value="land" minzoom="10" />
<subtype id="11" point="true" polygon="true" tag="natural" value="marsh" minzoom="11" />
<subtype id="12" point="true" polygon="true" tag="natural" value="mud" minzoom="11" />
<subtype id="13" point="true" tag="natural" value="peak" minzoom="11" nameNullTag="ele"/>
<subtype id="14" point="true" polygon="true" tag="natural" value="sand" minzoom="11" />
<subtype id="15" point="true" polygon="true" tag="natural" value="scree" minzoom="11" />
<subtype id="16" point="true" polygon="true" tag="natural" value="scrub" minzoom="11" />
<subtype id="17" point="true" tag="natural" value="spring" minzoom="14" />
<subtype id="18" point="true" tag="natural" value="stone" minzoom="15" />
<subtype id="19" point="true" tag="natural" value="tree" minzoom="15" />
<subtype id="20" point="true" tag="natural" value="volcano" minzoom="11" />
<subtype id="21" point="true" polygon="true" tag="natural" value="water" minzoom="4" />
<subtype id="21" point="true" polygon="true" tag="natural" value="lake" minzoom="4" />
<subtype id="22" point="true" polygon="true" tag="natural" value="wetland" minzoom="10" />
<subtype id="23" point="true" polygon="true" tag="natural" value="wood" minzoom="10" />
<subtype id="23" point="true" polygon="true" tag="landuse" value="wood" minzoom="10" />
<subtype id="31" point="true" polygon="true" tag="natural" minzoom="11" />
</type>
<type id="18" name="sustenance">
<subtype id="1" building="true" tag="amenity" value="restaurant" minzoom="15" />
<subtype id="2" building="true" tag="amenity" value="cafe" minzoom="15" />
<subtype id="3" building="true" tag="amenity" value="food_court" minzoom="15" />
<subtype id="4" building="true" tag="amenity" value="fast_food" minzoom="15" />
<subtype id="5" building="true" tag="amenity" value="pub" minzoom="15" />
<subtype id="6" building="true" tag="amenity" value="bar" minzoom="15" />
<subtype id="7" building="true" tag="amenity" value="biergarten" minzoom="15" />
<subtype id="8" point="true" tag="amenity" value="drinking_water" minzoom="15" />
<subtype id="9" point="true" tag="amenity" value="bbq" minzoom="15" />
</type>
<type id="19" name="education">
<subtype id="1" point="true" polygon_center="true" tag="amenity" value="kindergarten" minzoom="15" />
<subtype id="2" point="true" polygon_center="true" tag="amenity" value="school" minzoom="15" />
<subtype id="3" point="true" polygon_center="true" tag="amenity" value="college" minzoom="15" />
<subtype id="4" point="true" tag="amenity" value="library" minzoom="15" />
<subtype id="5" point="true" polygon_center="true" tag="amenity" value="university" minzoom="15" />
</type>
<type id="20" name="transportation">
<subtype id="1" point="true" polygon_center="true" tag="amenity" value="parking" minzoom="15" />
<subtype id="2" point="true" polygon_center="true" tag="amenity" value="bicycle_parking" minzoom="15" />
<subtype id="3" point="true" polygon="true" tag="amenity" value="ferry_terminal" minzoom="12" />
<subtype id="4" point="true" tag="amenity" value="fuel" minzoom="13" />
<subtype id="16" point="true" tag="amenity" value="taxi" minzoom="15" />
<subtype id="17" point="true" tag="amenity" value="bicycle_rental" minzoom="15" />
<subtype id="18" point="true" tag="amenity" value="bus_station" minzoom="13" />
<subtype id="19" point="true" tag="amenity" value="car_rental" minzoom="15" />
<subtype id="20" point="true" tag="amenity" value="car_sharing" minzoom="15" />
<subtype id="21" point="true" tag="amenity" value="car_wash" minzoom="15" />
<subtype id="22" point="true" tag="amenity" value="grit_bin" minzoom="15" />
</type>
<type id="21" name="finance">
<subtype id="1" point="true" tag="amenity" value="atm" minzoom="15" />
<subtype id="2" building="true" tag="amenity" value="bank" minzoom="15" />
<subtype id="3" point="true" tag="amenity" value="bureau_de_change" minzoom="15" />
</type>
<type id="22" name="healthcare">
<subtype id="1" building="true" tag="amenity" value="pharmacy" minzoom="15" />
<subtype id="2" point="true" polygon_center="true" tag="amenity" value="hospital" minzoom="15" />
<subtype id="3" point="true" tag="amenity" value="baby_hatch" minzoom="15" />
<subtype id="4" point="true" tag="amenity" value="dentist" minzoom="15" />
<subtype id="5" point="true" tag="amenity" value="doctors" minzoom="15" />
<subtype id="6" point="true" tag="amenity" value="veterinary" minzoom="15" />
<subtype id="7" point="true" tag="amenity" value="first_aid" minzoom="15" />
</type>
<type id="23" name="entertainment">
<subtype id="2" point="true" tag="amenity" value="arts_centre" minzoom="15" />
<subtype id="3" point="true" polygon_center="true" tag="amenity" value="cinema" minzoom="15" />
<subtype id="4" point="true" tag="amenity" value="community_centre" minzoom="15" />
<subtype id="5" point="true" tag="amenity" value="social_centre" minzoom="15" />
<subtype id="6" building="true" tag="amenity" value="nightclub" minzoom="15" />
<subtype id="7" point="true" tag="amenity" value="stripclub" minzoom="15" />
<subtype id="8" point="true" tag="amenity" value="studio" minzoom="15" />
<subtype id="9" building="true" tag="amenity" value="theatre" minzoom="15" />
<subtype id="10" point="true" tag="amenity" value="sauna" minzoom="15" />
<subtype id="11" building="true" tag="amenity" value="brothel" minzoom="15" />
<subtype id="33" point="true" tag="geocache" minzoom="15" />
<subtype id="34" point="true" tag="geocache" value="found" minzoom="15" />
<subtype id="35" point="true" tag="geocache" value="not found" minzoom="15" />
</type>
<type id="24" name="amenity_other">
<subtype id="1" point="true" polygon="true" tag="amenity" value="marketplace" minzoom="15" />
<subtype id="5" building="true" tag="amenity" value="courthouse" minzoom="15" />
<subtype id="6" building="true" tag="amenity" value="crematorium" minzoom="15" />
<subtype id="7" point="true" tag="amenity" value="embassy" minzoom="15" />
<subtype id="8" point="true" tag="amenity" value="grave_yard" minzoom="15" />
<subtype id="9" point="true" tag="amenity" value="hunting_stand" minzoom="15" />
<subtype id="10" point="true" tag="amenity" value="police" minzoom="15" />
<subtype id="11" point="true" tag="amenity" value="post_box" minzoom="15" />
<subtype id="12" building="true" tag="amenity" value="post_office" minzoom="15" />
<subtype id="13" point="true" tag="amenity" value="prison" minzoom="15" />
<subtype id="14" point="true" tag="amenity" value="public_building" minzoom="15" />
<subtype id="15" point="true" tag="amenity" value="recycling" minzoom="15" />
<subtype id="16" point="true" tag="amenity" value="shelter" minzoom="15" />
<subtype id="17" point="true" tag="amenity" value="telephone" minzoom="15" />
<subtype id="18" point="true" tag="amenity" value="toilets" minzoom="15" />
<subtype id="19" building="true" tag="amenity" value="townhall" minzoom="15" />
<subtype id="20" point="true" tag="amenity" value="vending_machine" minzoom="15" />
<subtype id="21" point="true" tag="amenity" value="waste_basket" minzoom="15" />
<subtype id="22" point="true" tag="amenity" value="waste_disposal" minzoom="15" />
<subtype id="23" point="true" tag="amenity" value="fountain" minzoom="15" />
<subtype id="24" point="true" tag="amenity" value="bench" minzoom="15" />
<subtype id="25" point="true" tag="amenity" value="clock" minzoom="15" />
<subtype id="26" point="true" tag="amenity" value="place_of_worship" minzoom="15" />
<subtype id="30" point="true" tag="amenity" minzoom="15" />
</type>
<type id="25" name="administrative">
<subtype id="41" point="true" tag="place" value="continent" minzoom="1" />
<subtype id="42" point="true" tag="place" value="country" minzoom="2" />
<subtype id="43" point="true" tag="place" value="state" minzoom="3" />
<subtype id="44" point="true" tag="place" value="region" minzoom="4" />
<subtype id="45" point="true" tag="place" value="county" minzoom="4" />
<subtype id="6" point="true" polygon_center="true" tag="place" value="city" minzoom="4" />
<subtype id="7" point="true" polygon_center="true" tag="place" value="town" minzoom="6" />
<subtype id="8" point="true" polygon_center="true" tag="place" value="village" minzoom="10" />
<subtype id="9" point="true" polygon_center="true" tag="place" value="hamlet" minzoom="10" />
<subtype id="10" point="true" polygon_center="true" tag="place" value="suburb" minzoom="10" />
<subtype id="11" point="true" polygon_center="true" tag="place" value="locality" minzoom="10" />
<subtype id="12" point="true" polygon_center="true" tag="place" value="island" minzoom="10" />
<!-- register(st, "boundary", "administrative", ADMINISTRATIVE, 15, POLYLINE_TYPE); //$NON-NLS-1$ //$NON-NLS-2$ -->
<subtype id="21" polyline="true" tag="admin_level" value="1" minzoom="2" />
<subtype id="22" polyline="true" tag="admin_level" value="2" minzoom="2" />
<subtype id="23" polyline="true" tag="admin_level" value="3" minzoom="5" />
<subtype id="24" polyline="true" tag="admin_level" value="4" minzoom="5" />
<subtype id="25" polyline="true" tag="admin_level" value="5" minzoom="6" />
<subtype id="26" polyline="true" tag="admin_level" value="6" minzoom="6" />
<subtype id="27" polyline="true" tag="admin_level" value="7" minzoom="6" />
<subtype id="28" polyline="true" tag="admin_level" value="8" minzoom="10" />
<subtype id="29" polyline="true" tag="admin_level" value="9" minzoom="11" />
<subtype id="30" polyline="true" tag="admin_level" value="10" minzoom="12" />
<subtype id="16" polyline="true" tag="boundary" value="civil" minzoom="7" />
<subtype id="17" polyline="true" tag="boundary" value="political" minzoom="7" />
<subtype id="18" polyline="true" tag="boundary" value="maritime" minzoom="7" />
<subtype id="19" polyline="true" tag="boundary" value="national_park" minzoom="7" />
<subtype id="20" polyline="true" tag="boundary" value="protected_area" minzoom="7" />
<subtype id="33" point="true" tag="addr:housenumber" minzoom="15" />
</type>
<type id="27" name="sport">
<subtype id="1" point="true" tag="sport" value="9pin" minzoom="15" />
<subtype id="2" point="true" tag="sport" value="10pin" minzoom="15" />
<subtype id="3" point="true" tag="sport" value="archery" minzoom="15" />
<subtype id="4" point="true" tag="sport" value="athletics" minzoom="15" />
<subtype id="5" point="true" tag="sport" value="australian_football" minzoom="15" />
<subtype id="6" point="true" tag="sport" value="baseball" minzoom="15" />
<subtype id="7" point="true" tag="sport" value="basketball" minzoom="15" />
<subtype id="8" point="true" tag="sport" value="beachvolleyball" minzoom="15" />
<subtype id="9" point="true" tag="sport" value="boules" minzoom="15" />
<subtype id="10" point="true" tag="sport" value="bowls" minzoom="15" />
<subtype id="11" point="true" tag="sport" value="canoe" minzoom="15" />
<subtype id="12" point="true" tag="sport" value="chess" minzoom="15" />
<subtype id="13" point="true" tag="sport" value="climbing" minzoom="15" />
<subtype id="14" point="true" tag="sport" value="cricket" minzoom="15" />
<subtype id="15" point="true" tag="sport" value="cricket_nets" minzoom="15" />
<subtype id="16" point="true" tag="sport" value="croquet" minzoom="15" />
<subtype id="17" point="true" tag="sport" value="cycling" minzoom="15" />
<subtype id="18" point="true" tag="sport" value="diving" minzoom="15" />
<subtype id="19" point="true" tag="sport" value="dog_racing" minzoom="15" />
<subtype id="20" point="true" tag="sport" value="equestrian" minzoom="15" />
<subtype id="21" point="true" tag="sport" value="football" minzoom="15" />
<subtype id="22" point="true" tag="sport" value="golf" minzoom="15" />
<subtype id="23" point="true" tag="sport" value="gymnastics" minzoom="15" />
<subtype id="24" point="true" tag="sport" value="hockey" minzoom="15" />
<subtype id="25" point="true" tag="sport" value="horse_racing" minzoom="15" />
<subtype id="26" point="true" tag="sport" value="ice_stock" minzoom="15" />
<subtype id="27" point="true" tag="sport" value="korfball" minzoom="15" />
<subtype id="28" point="true" tag="sport" value="motor" minzoom="15" />
<subtype id="29" point="true" tag="sport" value="multi" minzoom="15" />
<subtype id="30" point="true" tag="sport" value="orienteering" minzoom="15" />
<subtype id="31" point="true" tag="sport" value="paddle_tennis" minzoom="15" />
<subtype id="32" point="true" tag="sport" value="paragliding" minzoom="15" />
<subtype id="33" point="true" tag="sport" value="pelota" minzoom="15" />
<subtype id="34" point="true" tag="sport" value="racquet" minzoom="15" />
<subtype id="35" point="true" tag="sport" value="rowing" minzoom="15" />
<subtype id="36" point="true" tag="sport" value="rugby" minzoom="15" />
<subtype id="37" point="true" tag="sport" value="shooting" minzoom="15" />
<subtype id="38" point="true" tag="sport" value="skating" minzoom="15" />
<subtype id="39" point="true" tag="sport" value="skateboard" minzoom="15" />
<subtype id="40" point="true" tag="sport" value="skiing" minzoom="15" />
<subtype id="41" point="true" tag="sport" value="soccer" minzoom="15" />
<subtype id="42" point="true" tag="sport" value="swimming" minzoom="15" />
<subtype id="43" point="true" tag="sport" value="table_tennis" minzoom="15" />
<subtype id="44" point="true" tag="sport" value="team_handball" minzoom="15" />
<subtype id="45" point="true" tag="sport" value="tennis" minzoom="15" />
<subtype id="46" point="true" tag="sport" value="toboggan" minzoom="15" />
<subtype id="47" point="true" tag="sport" value="volleyball" minzoom="15" />
<subtype id="50" point="true" tag="sport" minzoom="15" />
</type>
</osmand_types>

View file

@ -12,7 +12,7 @@
<!-- Types : string, int, boolean; possibleValues comma separated possible values for int/string -->
<renderingProperty attr="hmRendered" name="Show more map detail" description="Increase amount of map detail shown"
type="boolean" possibleValues=""/>
<renderingProperty attr="viRendered" name="New colors" description="Experiment with road colors"
<renderingProperty attr="viRendered" name="New road colors" description="Experiment with road colors"
type="boolean" possibleValues=""/>
<renderingProperty attr="contourLines" name="Show contour lines" description="Select minimum zoom level to display in map if available. Separate SRTM-file may be needed."
type="string" possibleValues="never,13,12,11"/>
@ -40,6 +40,7 @@
All-Purpose Renderer (by Hardy Mueller), v023:
- with ShowMoreMapDetails some roads already rendered at lower zooms (travel/orienteering)
- with ShowMoreMapDetails motorways shown blue and trunk roads red, aligned with conventional road atlas
(road color scheme intensified on 2012-08-10. Old values commented with PALE-SCHEME)
- with ShowMoreMapDetails map rendering is aligned to typical map use for all zoom levels (scales), to always give a complete and reliable map.
Typical zoom level use (zX) and alignment of features displayed:
- z7 = "Rough Region Level Overview": Shows motorways, trunks, primary roads and city names
@ -1008,18 +1009,20 @@
<line>
<filter minzoom="1" tag="natural" value="coastline_broken" color="#111111" strokeWidth="1"/>
<group>
<filter hmRendered="true" tag="highway" value="motorway" maxzoom="13" color="#809bff"/>
<filter viRendered="true" tag="highway" value="motorway" maxzoom="13" color="#6666CC"/>
<filter tag="highway" value="motorway" maxzoom="13" color="#a58dff"/>
<filter hmRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#809bff"/>
<filter viRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#6666CC"/>
<filter tag="highway" value="motorway_link" maxzoom="13" color="#a58dff"/>
<filter hmRendered="true" tag="highway" value="trunk" maxzoom="13" color="#df1346"/>
<filter viRendered="true" tag="highway" value="trunk" maxzoom="13" color="#A02067"/>
<filter tag="highway" value="trunk" maxzoom="13" color="#ffaf80"/>
<filter hmRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#df1346"/>
<filter viRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#A02067"/>
<filter tag="highway" value="trunk_link" maxzoom="13" color="#ffaf80"/>
<filter hmRendered="true" tag="highway" value="motorway" maxzoom="13" color="#809bff"/>
<filter viRendered="true" tag="highway" value="motorway" maxzoom="13" color="#6666CC"/>
<filter tag="highway" value="motorway" maxzoom="13" color="#a58dff"/>
<filter hmRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#809bff"/>
<filter viRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#6666CC"/>
<filter tag="highway" value="motorway_link" maxzoom="13" color="#a58dff"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk" maxzoom="13" color="#df1346"/ -->
<filter hmRendered="true" tag="highway" value="trunk" maxzoom="13" color="#ed154b"/>
<filter viRendered="true" tag="highway" value="trunk" maxzoom="13" color="#A02067"/>
<filter tag="highway" value="trunk" maxzoom="13" color="#ffaf80"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#df1346"/ -->
<filter hmRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#ed154b"/>
<filter viRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#A02067"/>
<filter tag="highway" value="trunk_link" maxzoom="13" color="#ffaf80"/>
<groupFilter cap="ROUND">
<filter minzoom="5" maxzoom="9" strokeWidth="5"/>
<filter minzoom="10" maxzoom="10" strokeWidth="6"/>
@ -1030,10 +1033,14 @@
</group>
<group>
<filter viRendered="true" tag="highway" value="primary" color="#C04D61" maxzoom="13"/>
<filter tag="highway" value="primary" color="#eb989a" maxzoom="13"/>
<filter viRendered="true" tag="highway" value="primary_link" color="#C04D61" maxzoom="13"/>
<filter tag="highway" value="primary_link" color="#eb989a" maxzoom="13"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary" maxzoom="13" color="#eb989a"/ -->
<filter hmRendered="true" tag="highway" value="primary" maxzoom="13" color="#ed5a7f"/>
<filter viRendered="true" tag="highway" value="primary" maxzoom="13" color="#C04D61"/>
<filter tag="highway" value="primary" maxzoom="13" color="#eb989a"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary_link" maxzoom="13" color="#eb989a"/ -->
<filter hmRendered="true" tag="highway" value="primary_link" maxzoom="13" color="#ed5a7f"/>
<filter viRendered="true" tag="highway" value="primary_link" maxzoom="13" color="#C04D61"/>
<filter tag="highway" value="primary_link" maxzoom="13" color="#eb989a"/>
<groupFilter cap="ROUND">
<filter minzoom="7" maxzoom="9" strokeWidth="4"/>
<filter minzoom="10" maxzoom="10" strokeWidth="5"/>
@ -1044,10 +1051,14 @@
</group>
<group>
<filter viRendered="true" tag="highway" value="secondary" color="#F7D131" maxzoom="13"/>
<filter tag="highway" value="secondary" color="#fdd6a4" maxzoom="13"/>
<filter viRendered="true" tag="highway" value="secondary_link" color="#F7D131" maxzoom="13"/>
<filter tag="highway" value="secondary_link" color="#fdd6a4" maxzoom="13"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary" maxzoom="13" color="##fdd6a4"/ -->
<filter hmRendered="true" tag="highway" value="secondary" maxzoom="13" color="#ffd080"/>
<filter viRendered="true" tag="highway" value="secondary" maxzoom="13" color="#F7D131"/>
<filter tag="highway" value="secondary" maxzoom="13" color="#fdd6a4"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary_link" maxzoom="13" color="#fdd6a4"/ -->
<filter hmRendered="true" tag="highway" value="secondary_link" maxzoom="13" color="#ffd080"/>
<filter viRendered="true" tag="highway" value="secondary_link" maxzoom="13" color="#F7D131"/>
<filter tag="highway" value="secondary_link" maxzoom="13" color="#fdd6a4"/>
<groupFilter shadowRadius="1" cap="ROUND">
<filter minzoom="9" maxzoom="9" strokeWidth="3"/>
<filter minzoom="10" maxzoom="10" strokeWidth="4"/>
@ -1064,18 +1075,28 @@
<filter hmRendered="true" tag="highway" value="motorway_link" color="#809bff"/>
<filter viRendered="true" tag="highway" value="motorway_link" color="#6666CC"/>
<filter tag="highway" value="motorway_link" color="#a58dff"/>
<filter hmRendered="true" tag="highway" value="trunk" color="#df1346"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk" color="#df1346"/ -->
<filter hmRendered="true" tag="highway" value="trunk" color="#ed154b"/>
<filter viRendered="true" tag="highway" value="trunk" color="#A02067"/>
<filter tag="highway" value="trunk" color="#ffaf80"/>
<filter hmRendered="true" tag="highway" value="trunk_link" color="#df1346"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk_link" color="#df1346"/ -->
<filter hmRendered="true" tag="highway" value="trunk_link" color="#ed154b"/>
<filter viRendered="true" tag="highway" value="trunk_link" color="#A02067"/>
<filter tag="highway" value="trunk_link" color="#ffaf80"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary" color="#eb989a"/ -->
<filter hmRendered="true" tag="highway" value="primary" color="#ed5a7f"/>
<filter viRendered="true" tag="highway" value="primary" color="#C04D61"/>
<filter tag="highway" value="primary" color="#eb989a"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary_link" color="#eb989a"/ -->
<filter hmRendered="true" tag="highway" value="primary_link" color="#ed5a7f"/>
<filter viRendered="true" tag="highway" value="primary_link" color="#C04D61"/>
<filter tag="highway" value="primary_link" color="#eb989a"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary" color="#fdd6a4"/ -->
<filter hmRendered="true" tag="highway" value="secondary" color="#ffd080"/>
<filter viRendered="true" tag="highway" value="secondary" color="#F7D131"/>
<filter tag="highway" value="secondary" color="#fdd6a4"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary_link" color="#fdd6a4"/ -->
<filter hmRendered="true" tag="highway" value="secondary_link" color="#ffd080"/>
<filter viRendered="true" tag="highway" value="secondary_link" color="#F7D131"/>
<filter tag="highway" value="secondary_link" color="#fdd6a4"/>
@ -1101,10 +1122,14 @@
</group>
<group>
<filter tag="highway" value="tertiary" color="#fefeb3"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="tertiary" value="trunk_link" color="#fefeb3"/ -->
<filter hmRendered="true" tag="tertiary" value="trunk_link" color="#fefe83"/>
<filter viRendered="true" tag="tertiary" value="trunk_link" color="#F0CE30"/>
<filter tag="highway" value="tertiary_link" color="#fefeb3"/>
<filter tag="highway" value="tertiary" color="#fefeb3"/>
<!-- PALE-SCHEME filter hmRendered="true" tag="tertiary_link" value="trunk_link" color="#fefeb3"/ -->
<filter hmRendered="true" tag="tertiary_link" value="trunk_link" color="#fefe83"/>
<filter viRendered="true" tag="tertiary_link" value="trunk_link" color="#F0CE30"/>
<filter tag="highway" value="tertiary_link" color="#fefeb3"/>
<groupFilter shadowRadius="1" cap="ROUND">
<filter minzoom="10" maxzoom="10" strokeWidth="3"/>
<filter minzoom="11" maxzoom="11" strokeWidth="4"/>

View file

@ -89,6 +89,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.rim.ajde.internal.verifier</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
@ -97,6 +102,7 @@
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>net.rim.ajde.BlackBerryAndroidNature</nature>
</natures>
<linkedResources>
<link>

View file

@ -128,6 +128,14 @@
<exclude name="**/*.java" />
</fileset>
</copy>
<if>
<condition>
<isset property="versionFeatures" />
</condition>
<then>
<replaceregexp file="res/values/no_translate.xml" match='versionFeatures"&gt;(.*)&lt;' replace='versionFeatures"&gt;${versionFeatures}&lt;' byline="true" />
</then>
</if>
<if>
<condition>
<isset property="net.osmand" />
@ -137,6 +145,8 @@
<replaceregexp file="AndroidManifest.xml" match='package="net.osmand.plus"' replace='package="net.osmand"' byline="true" />
<replaceregexp file="AndroidManifest.xml" match='android:process="net.osmand.plus"' replace='android:process="net.osmand"' byline="true" />
<replaceregexp file="res/values/no_translate.xml" match='"app_name"&gt;(.*)&lt;' replace='"app_name"&gt;Osmand&lt;' byline="true" />
<replaceregexp file="res/layout/search_address.xml" match='net.osmand.plus' replace='net.osmand' byline="true" />
<replaceregexp file="res/layout/navigate_point.xml" match='net.osmand.plus' replace='net.osmand' byline="true" />
</then>
<else>
<replaceregexp file="AndroidManifest.xml" match='"@drawable/icon_free"' replace='"@drawable/icon"' byline="true" />

View file

@ -16,7 +16,8 @@
<!-- LAYER and SPECIAL PURPOSE consistency colors -->
<color name="gpx_track">#B4A00AD7</color>
<color name="gpx_track_fluorescent">#B400FFFF</color>
<!-- try magenta instead of cyan color name="gpx_track_fluorescent">#B400FFFF</color>
<color name="gpx_track_fluorescent">#B4FF00FF</color>
<color name="pos_heading">#320000FF</color>
<color name="pos_area">#280000FF</color>
<color name="pos_around">#707CDC</color> <!-- family blue similar to above -->

View file

@ -6,5 +6,5 @@
<string name="ga_api_key">UA-28342846-2</string>
<string name="ga_dispatchPeriod">10</string>
<string name="ga_debug">true</string>
<string name="versionFeatures">+play_market +gps_status -parking_plugin -blackberry -free_version</string>
</resources>

View file

@ -9,6 +9,8 @@
1. All your modified/created strings are in the top of the file (to make easier find what's translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="live_monitoring_mode_off">Live tracking</string>
<string name="live_monitoring_mode_on">Stop Live tracking</string>
<string name="layer_map_appearance">Configure screen&#8230;</string>
<string name="show_lanes">Show lanes</string>
<string name="avoid_unpaved">Avoid unpaved roads</string>
@ -203,7 +205,6 @@ You can enable (online or cached) tile map sources, tracking settings, and many
<string name="default_buttons_support">Support</string>
<string name="support_new_features">Support new features</string>
<string name="show_ruler_level_descr">Display ruler on the map</string>
<string name="show_ruler_level">Display ruler</string>
<string name="info_button">Info</string>
@ -401,7 +402,6 @@ You can enable (online or cached) tile map sources, tracking settings, and many
\n\t- Other small features
</string>
<string name="use_transparent_map_theme_descr">Use transparent map controls</string>
<string name="use_transparent_map_theme">Transparent theme</string>
<string name="native_library_not_supported">Native library is not supported on this device.</string>
@ -991,10 +991,7 @@ You can enable (online or cached) tile map sources, tracking settings, and many
<string name="choose_street">Choose street</string>
<string name="choose_city">Choose city</string>
<string name="ChooseCountry">Choose country</string>
<string name="position_on_map_descr">Choose location of position marker on the map</string>
<string name="position_on_map">Position marker</string>
<string name="map_specify_point">Set as destination</string>
<string name="show_view_angle_descr">Display viewing direction on the map</string>
<string name="show_view_angle">Display viewing direction</string>
<string name="stop_navigation">Clear destin.</string>
<string name="navigate_to_point">Set as dest.</string>

View file

@ -32,7 +32,7 @@
<PreferenceCategory android:title="@string/global_settings" android:key="global_settings" >
<PreferenceScreen android:key="general_settings" android:title="@string/general_settings" android:summary="@string/general_settings_descr">
<PreferenceCategory android:title="@string/global_app_settings">
<PreferenceCategory android:title="@string/global_app_settings" android:key="global_app_settings">
<ListPreference android:key="map_screen_orientation" android:title="@string/map_screen_orientation" android:summary="@string/map_screen_orientation_descr"></ListPreference>
<ListPreference android:key="preferred_locale" android:title="@string/preferred_locale" android:summary="@string/preferred_locale_descr"></ListPreference>
<CheckBoxPreference android:summary="@string/use_english_names_descr" android:title="@string/use_english_names"
@ -40,8 +40,6 @@
<ListPreference android:key="default_metric_system" android:title="@string/unit_of_length" android:summary="@string/unit_of_length_descr"></ListPreference>
<CheckBoxPreference android:summary="@string/left_side_navigation_descr" android:title="@string/left_side_navigation"
android:key="left_side_navigation"></CheckBoxPreference>
<CheckBoxPreference android:key="native_rendering" android:title="@string/native_rendering" android:summary="@string/vector_maps_may_display_faster_on_some_devices"></CheckBoxPreference>
<EditTextPreference android:title="@string/application_dir" android:key="external_storage_dir"></EditTextPreference>
</PreferenceCategory>
</PreferenceScreen>

View file

@ -12,6 +12,27 @@ public class Version {
private final String appName;
private final static String FREE_VERSION_NAME = "net.osmand";
public static boolean isGpsStatusEnabled(Context ctx) {
return ctx.getString(R.string.versionFeatures).contains("+gps_status");
}
public static boolean isBlackberry(Context ctx) {
return ctx.getString(R.string.versionFeatures).contains("+blackberry");
}
public static boolean isGooglePlayEnabled(Context ctx) {
return ctx.getString(R.string.versionFeatures).contains("+play_market");
}
public static boolean isFreeVersionEnabled(Context ctx) {
return ctx.getString(R.string.versionFeatures).contains("+free_version");
}
public static boolean isParkingPluginInlined(Context ctx) {
return ctx.getString(R.string.versionFeatures).contains("+parking_plugin");
}
private Version(Context ctx) {
appVersion = ctx.getString(R.string.app_version);
appName = ctx.getString(R.string.app_name);
@ -54,7 +75,7 @@ public class Version {
}
public static boolean isFreeVersion(Context ctx){
return ctx.getPackageName().equals(FREE_VERSION_NAME);
return ctx.getPackageName().equals(FREE_VERSION_NAME) || isFreeVersionEnabled(ctx);
}

View file

@ -13,6 +13,7 @@ import java.util.Locale;
import net.osmand.Algoritms;
import net.osmand.FavouritePoint;
import net.osmand.GPXUtilities;
import net.osmand.Version;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.WptPt;
import net.osmand.LogUtil;
@ -391,19 +392,21 @@ public class OsmandApplication extends Application {
private void startApplicationBackground() {
List<String> warnings = new ArrayList<String>();
try {
if(osmandSettings.NATIVE_RENDERING_FAILED.get()){
osmandSettings.NATIVE_RENDERING.set(false);
osmandSettings.NATIVE_RENDERING_FAILED.set(false);
warnings.add(getString(R.string.native_library_not_supported));
} else if (osmandSettings.NATIVE_RENDERING.get()) {
osmandSettings.NATIVE_RENDERING_FAILED.set(true);
startDialog.startTask(getString(R.string.init_native_library), -1);
RenderingRulesStorage storage = rendererRegistry.getCurrentSelectedRenderer();
boolean initialized = NativeOsmandLibrary.getLibrary(storage) != null;
osmandSettings.NATIVE_RENDERING_FAILED.set(false);
if (!initialized) {
LOG.info("Native library could not loaded!");
if (!Version.isBlackberry(this)) {
if (osmandSettings.NATIVE_RENDERING_FAILED.get()) {
osmandSettings.NATIVE_RENDERING.set(false);
osmandSettings.NATIVE_RENDERING_FAILED.set(false);
warnings.add(getString(R.string.native_library_not_supported));
} else if (osmandSettings.NATIVE_RENDERING.get()) {
osmandSettings.NATIVE_RENDERING_FAILED.set(true);
startDialog.startTask(getString(R.string.init_native_library), -1);
RenderingRulesStorage storage = rendererRegistry.getCurrentSelectedRenderer();
boolean initialized = NativeOsmandLibrary.getLibrary(storage) != null;
osmandSettings.NATIVE_RENDERING_FAILED.set(false);
if (!initialized) {
LOG.info("Native library could not loaded!");
osmandSettings.NATIVE_RENDERING.set(false);
}
}
}
warnings.addAll(manager.reloadIndexes(startDialog));

View file

@ -15,6 +15,7 @@ import net.osmand.FavouritePoint;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.LogUtil;
import net.osmand.Version;
import net.osmand.access.AccessibleAlertBuilder;
import net.osmand.access.AccessibleToast;
import net.osmand.data.Amenity;
@ -972,16 +973,20 @@ public class MapActivityActions implements DialogProvider {
return true;
}
});
optionsMenuHelper.registerOptionsMenuItem(R.string.show_gps_status, R.string.show_gps_status, android.R.drawable.ic_menu_compass, new OnOptionsMenuClick() {
@Override
public void prepareOptionsMenu(Menu menu, MenuItem item) {
}
@Override
public boolean onClick(MenuItem item) {
startGpsStatusIntent();
return false;
}
});
if (Version.isGpsStatusEnabled(mapActivity) && !Version.isBlackberry(mapActivity)) {
optionsMenuHelper.registerOptionsMenuItem(R.string.show_gps_status, R.string.show_gps_status,
android.R.drawable.ic_menu_compass, new OnOptionsMenuClick() {
@Override
public void prepareOptionsMenu(Menu menu, MenuItem item) {
}
@Override
public boolean onClick(MenuItem item) {
startGpsStatusIntent();
return false;
}
});
}
optionsMenuHelper.registerOptionsMenuItem(R.string.show_point_options, R.string.show_point_options, new OnOptionsMenuClick() {
@Override
public void prepareOptionsMenu(Menu menu, MenuItem item) {
@ -1015,21 +1020,24 @@ public class MapActivityActions implements DialogProvider {
if (resolved != null) {
mapActivity.startActivity(intent);
} else {
AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity);
builder.setMessage(getString(R.string.gps_status_app_not_found));
builder.setPositiveButton(getString(R.string.default_buttons_yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + GPS_STATUS_COMPONENT));
try {
mapActivity.startActivity(intent);
} catch (ActivityNotFoundException e) {
if (Version.isGooglePlayEnabled(mapActivity)) {
AlertDialog.Builder builder = new AccessibleAlertBuilder(mapActivity);
builder.setMessage(getString(R.string.gps_status_app_not_found));
builder.setPositiveButton(getString(R.string.default_buttons_yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + GPS_STATUS_COMPONENT));
try {
mapActivity.startActivity(intent);
} catch (ActivityNotFoundException e) {
}
}
}
});
builder.setNegativeButton(
getString(R.string.default_buttons_no), null);
builder.show();
});
builder.setNegativeButton(getString(R.string.default_buttons_no), null);
builder.show();
} else {
Toast.makeText(mapActivity, R.string.gps_status_app_not_found, Toast.LENGTH_LONG).show();
}
}
}

View file

@ -57,17 +57,17 @@ import android.widget.ListView;
import android.widget.Toast;
public class SettingsActivity extends PreferenceActivity implements OnPreferenceChangeListener, OnPreferenceClickListener {
public static final String INTENT_KEY_SETTINGS_SCREEN = "INTENT_KEY_SETTINGS_SCREEN";
public static final int SCREEN_GENERAL_SETTINGS = 1;
public static final int SCREEN_NAVIGATION_SETTINGS = 2;
public static final int SCREEN_MONITORING_SETTINGS = 3;
public static final String SCREEN_ID_GENERAL_SETTINGS = "general_settings";
public static final String SCREEN_ID_NAVIGATION_SETTINGS = "routing_settings";
public static final String SCREEN_ID_MONITORING_SETTINGS = "monitor_settings";
public static final String MORE_VALUE = "MORE_VALUE";
private Preference bidforfix;
private Preference plugins;
private Preference avoidRouting;
@ -80,26 +80,26 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
private ListPreference routerServicePreference;
public ProgressDialog progressDlg;
private OsmandSettings osmandSettings;
private Map<String, Preference> screenPreferences = new LinkedHashMap<String, Preference>();
private Map<String, OsmandPreference<Boolean>> booleanPreferences = new LinkedHashMap<String, OsmandPreference<Boolean>>();
private Map<String, OsmandPreference<?>> listPreferences = new LinkedHashMap<String, OsmandPreference<?>>();
private Map<String, OsmandPreference<String>> editTextPreferences = new LinkedHashMap<String, OsmandPreference<String>>();
private Map<String, OsmandPreference<Integer>> seekBarPreferences = new LinkedHashMap<String, OsmandPreference<Integer>>();
private Map<String, Map<String, ?>> listPrefValues = new LinkedHashMap<String, Map<String, ?>>();
public CheckBoxPreference registerBooleanPreference(OsmandPreference<Boolean> b, PreferenceScreen screen){
public CheckBoxPreference registerBooleanPreference(OsmandPreference<Boolean> b, PreferenceScreen screen) {
CheckBoxPreference p = (CheckBoxPreference) screen.findPreference(b.getId());
p.setOnPreferenceChangeListener(this);
screenPreferences.put(b.getId(), p);
booleanPreferences.put(b.getId(), b);
return p;
}
public CheckBoxPreference createCheckBoxPreference(OsmandPreference<Boolean> b, int title, int summary){
public CheckBoxPreference createCheckBoxPreference(OsmandPreference<Boolean> b, int title, int summary) {
CheckBoxPreference p = new CheckBoxPreference(this);
p.setTitle(title);
p.setKey(b.getId());
@ -109,18 +109,18 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
booleanPreferences.put(b.getId(), b);
return p;
}
public void registerSeekBarPreference(OsmandPreference<Integer> b, PreferenceScreen screen){
public void registerSeekBarPreference(OsmandPreference<Integer> b, PreferenceScreen screen) {
SeekBarPreference p = (SeekBarPreference) screen.findPreference(b.getId());
p.setOnPreferenceChangeListener(this);
screenPreferences.put(b.getId(), p);
seekBarPreferences.put(b.getId(), b);
}
public String getStringPropertyName(String propertyName, String defValue) {
try {
Field f = R.string.class.getField("rendering_attr_"+propertyName+"_name");
if(f != null) {
Field f = R.string.class.getField("rendering_attr_" + propertyName + "_name");
if (f != null) {
Integer in = (Integer) f.get(null);
return getString(in);
}
@ -129,11 +129,11 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
return defValue;
}
public String getStringPropertyDescription(String propertyName, String defValue) {
try {
Field f = R.string.class.getField("rendering_attr_"+propertyName+"_description");
if(f != null) {
Field f = R.string.class.getField("rendering_attr_" + propertyName + "_description");
if (f != null) {
Integer in = (Integer) f.get(null);
return getString(in);
}
@ -142,9 +142,9 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
return defValue;
}
public SeekBarPreference createSeekBarPreference(OsmandPreference<Integer> b, int title, int summary, int dialogTextId,
int defValue, int maxValue){
public SeekBarPreference createSeekBarPreference(OsmandPreference<Integer> b, int title, int summary, int dialogTextId, int defValue,
int maxValue) {
SeekBarPreference p = new SeekBarPreference(this, dialogTextId, defValue, maxValue);
p.setTitle(title);
p.setKey(b.getId());
@ -154,13 +154,13 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
seekBarPreferences.put(b.getId(), b);
return p;
}
public <T> void registerListPreference(OsmandPreference<T> b, PreferenceScreen screen, String[] names, T[] values){
public <T> void registerListPreference(OsmandPreference<T> b, PreferenceScreen screen, String[] names, T[] values) {
ListPreference p = (ListPreference) screen.findPreference(b.getId());
prepareListPreference(b, names, values, p);
}
public <T> ListPreference createListPreference(OsmandPreference<T> b, String[] names, T[] values, int title, int summary){
public <T> ListPreference createListPreference(OsmandPreference<T> b, String[] names, T[] values, int title, int summary) {
ListPreference p = new ListPreference(this);
p.setTitle(title);
p.setKey(b.getId());
@ -177,19 +177,19 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
listPreferences.put(b.getId(), b);
listPrefValues.put(b.getId(), vals);
assert names.length == values.length;
for(int i=0; i<names.length; i++){
for (int i = 0; i < names.length; i++) {
vals.put(names[i], values[i]);
}
}
public void registerEditTextPreference(OsmandPreference<String> b, PreferenceScreen screen){
public void registerEditTextPreference(OsmandPreference<String> b, PreferenceScreen screen) {
EditTextPreference p = (EditTextPreference) screen.findPreference(b.getId());
p.setOnPreferenceChangeListener(this);
screenPreferences.put(b.getId(), p);
editTextPreferences.put(b.getId(), b);
}
public EditTextPreference createEditTextPreference(OsmandPreference<String> b, int title, int summary){
public EditTextPreference createEditTextPreference(OsmandPreference<String> b, int title, int summary) {
EditTextPreference p = new EditTextPreference(this);
p.setTitle(title);
p.setKey(b.getId());
@ -200,16 +200,16 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
editTextPreferences.put(b.getId(), b);
return p;
}
@Override
public void setContentView(View view) {
super.setContentView(view);
}
public void registerTimeListPreference(OsmandPreference<Integer> b, PreferenceScreen screen, int[] seconds, int[] minutes, int coeff){
int minutesLength = minutes == null? 0 : minutes.length;
int secondsLength = seconds == null? 0 : seconds.length;
Integer[] ints = new Integer[secondsLength + minutesLength];
public void registerTimeListPreference(OsmandPreference<Integer> b, PreferenceScreen screen, int[] seconds, int[] minutes, int coeff) {
int minutesLength = minutes == null ? 0 : minutes.length;
int secondsLength = seconds == null ? 0 : seconds.length;
Integer[] ints = new Integer[secondsLength + minutesLength];
String[] intDescriptions = new String[ints.length];
for (int i = 0; i < secondsLength; i++) {
ints[i] = seconds[i] * coeff;
@ -221,11 +221,12 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
registerListPreference(b, screen, intDescriptions, ints);
}
public ListPreference createTimeListPreference(OsmandPreference<Integer> b, int[] seconds, int[] minutes, int coeff, int title, int summary){
int minutesLength = minutes == null? 0 : minutes.length;
int secondsLength = seconds == null? 0 : seconds.length;
Integer[] ints = new Integer[secondsLength + minutesLength];
public ListPreference createTimeListPreference(OsmandPreference<Integer> b, int[] seconds, int[] minutes, int coeff, int title,
int summary) {
int minutesLength = minutes == null ? 0 : minutes.length;
int secondsLength = seconds == null ? 0 : seconds.length;
Integer[] ints = new Integer[secondsLength + minutesLength];
String[] intDescriptions = new String[ints.length];
for (int i = 0; i < secondsLength; i++) {
ints[i] = seconds[i] * coeff;
@ -237,8 +238,8 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
return createListPreference(b, intDescriptions, ints, title, summary);
}
private Set<String> getVoiceFiles(){
private Set<String> getVoiceFiles() {
// read available voice data
File extStorage = osmandSettings.extendOsmandPath(ResourceManager.VOICE_PATH);
Set<String> setFiles = new LinkedHashSet<String>();
@ -252,7 +253,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
return setFiles;
}
@Override
@Override
public void onCreate(Bundle savedInstanceState) {
CustomTitleBar titleBar = new CustomTitleBar(this, R.string.settings_activity, R.drawable.tab_settings_screen_icon);
setTheme(R.style.CustomTitleTheme_Preference);
@ -261,11 +262,30 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
titleBar.afterSetContentView();
String[] entries;
String[] entrieValues;
PreferenceScreen screen = getPreferenceScreen();
osmandSettings = getMyApplication().getSettings();
PreferenceCategory cat = (PreferenceCategory) screen.findPreference("global_app_settings");
if (!Version.isBlackberry(this)) {
CheckBoxPreference nativeCheckbox = createCheckBoxPreference(osmandSettings.NATIVE_RENDERING, R.string.native_rendering,
R.string.vector_maps_may_display_faster_on_some_devices);
// disable the checkbox if the library cannot be used
if ((NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) || osmandSettings.NATIVE_RENDERING_FAILED.get()) {
nativeCheckbox.setEnabled(false);
}
cat.addPreference(nativeCheckbox);
applicationDir = new EditTextPreference(this);
applicationDir.setTitle(R.string.application_dir);
applicationDir.setKey("external_storage_dir");
applicationDir.setDialogTitle(R.string.application_dir);
applicationDir.setOnPreferenceChangeListener(this);
cat.addPreference(applicationDir);
}
// BidForFixHelper bidForFixHelper = getMyApplication().getBidForFix();
// bidForFixHelper.generatePreferenceList(screen, getString(R.string.support_new_features), this);
OsmandPlugin.onSettingsActivityCreate(this, screen);
@ -276,17 +296,6 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
registerBooleanPreference(osmandSettings.USE_COMPASS_IN_NAVIGATION, screen);
registerBooleanPreference(osmandSettings.LEFT_SIDE_NAVIGATION, screen);
// registerBooleanPreference(osmandSettings.SHOW_CAMERAS, screen);
// registerBooleanPreference(osmandSettings.SHOW_SPEED_LIMITS, screen);
// registerBooleanPreference(osmandSettings.AVOID_TOLL_ROADS, screen);
CheckBoxPreference nativeCheckbox = registerBooleanPreference(osmandSettings.NATIVE_RENDERING,screen);
//disable the checkbox if the library cannot be used
if ((NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) ||
osmandSettings.NATIVE_RENDERING_FAILED.get()) {
nativeCheckbox.setEnabled(false);
}
// List preferences
registerListPreference(osmandSettings.ROTATE_MAP, screen,
@ -372,8 +381,6 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
Preference localIndexes =(Preference) screen.findPreference(OsmandSettings.LOCAL_INDEXES);
localIndexes.setOnPreferenceClickListener(this);
applicationDir = (EditTextPreference) screen.findPreference(OsmandSettings.EXTERNAL_STORAGE_DIR);
applicationDir.setOnPreferenceChangeListener(this);
bidforfix = (Preference) screen.findPreference("bidforfix");
bidforfix.setOnPreferenceClickListener(this);
plugins = (Preference) screen.findPreference("plugins");
@ -434,7 +441,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
}
}
}
private void reloadVoiceListPreference(PreferenceScreen screen) {
@ -444,7 +451,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
entries = new String[voiceFiles.size() + 2];
entrieValues = new String[voiceFiles.size() + 2];
int k = 0;
// entries[k++] = getString(R.string.voice_not_specified);
// entries[k++] = getString(R.string.voice_not_specified);
entrieValues[k] = OsmandSettings.VOICE_PROVIDER_NOT_USE;
entries[k++] = getString(R.string.voice_not_use);
for (String s : voiceFiles) {
@ -458,68 +465,70 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
private void updateApplicationDirTextAndSummary() {
String storageDir = osmandSettings.getExternalStorageDirectory().getAbsolutePath();
applicationDir.setText(storageDir);
applicationDir.setSummary(storageDir);
if(applicationDir != null) {
String storageDir = osmandSettings.getExternalStorageDirectory().getAbsolutePath();
applicationDir.setText(storageDir);
applicationDir.setSummary(storageDir);
}
}
@Override
protected void onResume() {
@Override
protected void onResume() {
super.onResume();
updateAllSettings();
}
@Override
protected void onDestroy() {
OsmandPlugin.onSettingsActivityDestroy(this);
super.onDestroy();
}
public void updateAllSettings(){
for(OsmandPreference<Boolean> b : booleanPreferences.values()){
CheckBoxPreference pref = (CheckBoxPreference) screenPreferences.get(b.getId());
pref.setChecked(b.get());
}
for(OsmandPreference<Integer> b : seekBarPreferences.values()){
SeekBarPreference pref = (SeekBarPreference) screenPreferences.get(b.getId());
pref.setValue(b.get());
}
reloadVoiceListPreference(getPreferenceScreen());
for(OsmandPreference<?> p : listPreferences.values()){
ListPreference listPref = (ListPreference) screenPreferences.get(p.getId());
Map<String, ?> prefValues = listPrefValues.get(p.getId());
String[] entryValues = new String[prefValues.size()];
String[] entries = new String[prefValues.size()];
int i = 0;
for(Entry<String, ?> e : prefValues.entrySet()){
entries[i] = e.getKey();
@Override
protected void onDestroy() {
OsmandPlugin.onSettingsActivityDestroy(this);
super.onDestroy();
}
public void updateAllSettings() {
for (OsmandPreference<Boolean> b : booleanPreferences.values()) {
CheckBoxPreference pref = (CheckBoxPreference) screenPreferences.get(b.getId());
pref.setChecked(b.get());
}
for (OsmandPreference<Integer> b : seekBarPreferences.values()) {
SeekBarPreference pref = (SeekBarPreference) screenPreferences.get(b.getId());
pref.setValue(b.get());
}
reloadVoiceListPreference(getPreferenceScreen());
for (OsmandPreference<?> p : listPreferences.values()) {
ListPreference listPref = (ListPreference) screenPreferences.get(p.getId());
Map<String, ?> prefValues = listPrefValues.get(p.getId());
String[] entryValues = new String[prefValues.size()];
String[] entries = new String[prefValues.size()];
int i = 0;
for (Entry<String, ?> e : prefValues.entrySet()) {
entries[i] = e.getKey();
entryValues[i] = e.getValue() + ""; // case of null
i++;
}
listPref.setEntries(entries);
listPref.setEntryValues(entryValues);
i++;
}
listPref.setEntries(entries);
listPref.setEntryValues(entryValues);
listPref.setValue(p.get() + "");
}
for(OsmandPreference<String> s : editTextPreferences.values()){
EditTextPreference pref = (EditTextPreference) screenPreferences.get(s.getId());
pref.setText(s.get());
}
OsmandPlugin.onSettingsActivityUpdate(this);
}
for (OsmandPreference<String> s : editTextPreferences.values()) {
EditTextPreference pref = (EditTextPreference) screenPreferences.get(s.getId());
pref.setText(s.get());
}
OsmandPlugin.onSettingsActivityUpdate(this);
updateApplicationDirTextAndSummary();
applicationModePreference.setTitle(getString(R.string.settings_preset) + " [" + osmandSettings.APPLICATION_MODE.get().toHumanString(this) + "]");
dayNightModePreference.setSummary(getString(R.string.daynight_descr) + " [" + osmandSettings.DAYNIGHT_MODE.get().toHumanString(this) + "]");
applicationModePreference.setTitle(getString(R.string.settings_preset) + " ["
+ osmandSettings.APPLICATION_MODE.get().toHumanString(this) + "]");
dayNightModePreference.setSummary(getString(R.string.daynight_descr) + " ["
+ osmandSettings.DAYNIGHT_MODE.get().toHumanString(this) + "]");
routerServicePreference.setSummary(getString(R.string.router_service_descr) + " [" + osmandSettings.ROUTER_SERVICE.get() + "]");
}
}
@SuppressWarnings("unchecked")
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
@ -528,10 +537,10 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
OsmandPreference<Integer> seekPref = seekBarPreferences.get(preference.getKey());
OsmandPreference<Object> listPref = (OsmandPreference<Object>) listPreferences.get(preference.getKey());
OsmandPreference<String> editPref = editTextPreferences.get(preference.getKey());
if(boolPref != null){
boolPref.set((Boolean)newValue);
if (boolPref != null) {
boolPref.set((Boolean) newValue);
if (boolPref.getId().equals(osmandSettings.NATIVE_RENDERING.getId())) {
if(((Boolean)newValue).booleanValue()) {
if (((Boolean) newValue).booleanValue()) {
loadNativeLibrary();
}
}
@ -546,12 +555,12 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
Object obj = map.get(entry);
final Object oldValue = listPref.get();
boolean changed = listPref.set(obj);
// Specific actions after list preference changed
if (changed) {
if (listPref.getId().equals(osmandSettings.VOICE_PROVIDER.getId())) {
if (MORE_VALUE.equals(newValue)) {
listPref.set(oldValue); //revert the change..
listPref.set(oldValue); // revert the change..
final Intent intent = new Intent(this, DownloadIndexActivity.class);
intent.putExtra(DownloadIndexActivity.FILTER_KEY, "voice");
startActivity(intent);
@ -559,7 +568,8 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
getMyApplication().showDialogInitializingCommandPlayer(this, false);
}
} else if (listPref.getId().equals(osmandSettings.ROUTER_SERVICE.getId())) {
routerServicePreference.setSummary(getString(R.string.router_service_descr) + " [" + osmandSettings.ROUTER_SERVICE.get() + "]");
routerServicePreference.setSummary(getString(R.string.router_service_descr) + " ["
+ osmandSettings.ROUTER_SERVICE.get() + "]");
} else if (listPref.getId().equals(osmandSettings.APPLICATION_MODE.getId())) {
updateAllSettings();
} else if (listPref.getId().equals(osmandSettings.PREFERRED_LOCALE.getId())) {
@ -569,41 +579,40 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
finish();
startActivity(intent);
} else if (listPref.getId().equals(osmandSettings.DAYNIGHT_MODE.getId())) {
dayNightModePreference.setSummary(getString(R.string.daynight_descr) + " [" + osmandSettings.DAYNIGHT_MODE.get().toHumanString(this) + "]");
dayNightModePreference.setSummary(getString(R.string.daynight_descr) + " ["
+ osmandSettings.DAYNIGHT_MODE.get().toHumanString(this) + "]");
}
}
if (listPref.getId().equals(osmandSettings.RENDERER.getId())) {
if(changed){
if (changed) {
AccessibleToast.makeText(this, R.string.renderer_load_sucess, Toast.LENGTH_SHORT).show();
} else {
AccessibleToast.makeText(this, R.string.renderer_load_exception, Toast.LENGTH_SHORT).show();
}
createCustomRenderingProperties(true);
}
} else if(preference == applicationDir){
} else if (preference == applicationDir) {
warnAboutChangingStorage((String) newValue);
return false;
}
return true;
}
private void warnAboutChangingStorage(final String newValue) {
final String newDir = newValue != null ? newValue.trim(): newValue;
final String newDir = newValue != null ? newValue.trim() : newValue;
File path = new File(newDir);
path.mkdirs();
if(!path.canRead() || !path.exists()){
AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show() ;
if (!path.canRead() || !path.exists()) {
AccessibleToast.makeText(this, R.string.specified_dir_doesnt_exist, Toast.LENGTH_LONG).show();
return;
}
Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.application_dir_change_warning));
builder.setPositiveButton(R.string.default_buttons_yes, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//edit the preference
// edit the preference
osmandSettings.setExternalStorageDirectory(newDir);
getMyApplication().getResourceManager().resetStoreDirectory();
reloadIndexes();
@ -614,27 +623,27 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
builder.show();
}
public void reloadIndexes(){
public void reloadIndexes() {
reloadVoiceListPreference(getPreferenceScreen());
progressDlg = ProgressDialog.show(this, getString(R.string.loading_data), getString(R.string.reading_indexes), true);
final ProgressDialogImplementation impl = new ProgressDialogImplementation(progressDlg);
impl.setRunnable("Initializing app", new Runnable(){ //$NON-NLS-1$
@Override
public void run() {
try {
showWarnings(getMyApplication().getResourceManager().reloadIndexes(impl));
} finally {
if(progressDlg !=null){
progressDlg.dismiss();
progressDlg = null;
impl.setRunnable("Initializing app", new Runnable() { //$NON-NLS-1$
@Override
public void run() {
try {
showWarnings(getMyApplication().getResourceManager().reloadIndexes(impl));
} finally {
if (progressDlg != null) {
progressDlg.dismiss();
progressDlg = null;
}
}
}
}
}
});
});
impl.run();
}
public void loadNativeLibrary(){
public void loadNativeLibrary() {
if (!NativeOsmandLibrary.isLoaded()) {
final RenderingRulesStorage storage = getMyApplication().getRendererRegistry().getCurrentSelectedRenderer();
new AsyncTask<Void, Void, Void>() {
@ -660,25 +669,26 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}.execute();
}
}
private OsmandApplication getMyApplication() {
return (OsmandApplication)getApplication();
return (OsmandApplication) getApplication();
}
@Override
protected void onStop() {
if(progressDlg !=null){
if (progressDlg != null) {
progressDlg.dismiss();
progressDlg = null;
}
super.onStop();
}
protected void showWarnings(List<String> warnings) {
if (!warnings.isEmpty()) {
final StringBuilder b = new StringBuilder();
boolean f = true;
for (String w : warnings) {
if(f){
if (f) {
f = false;
} else {
b.append('\n');
@ -694,55 +704,53 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
});
}
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
Preference preference) {
//customize the sub-preference title according the selected profile
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
// customize the sub-preference title according the selected profile
String title = "";
if (preference.getKey() != null && preference instanceof PreferenceScreen &&
((PreferenceCategory)findPreference("profile_dep_cat")).findPreference(preference.getKey()) != null) {
PreferenceScreen scr = (PreferenceScreen)preference;
if (preference.getKey() != null && preference instanceof PreferenceScreen
&& ((PreferenceCategory) findPreference("profile_dep_cat")).findPreference(preference.getKey()) != null) {
PreferenceScreen scr = (PreferenceScreen) preference;
title = scr.getTitle().toString();
if(title.startsWith("-")){
if (title.startsWith("-")) {
title = title.substring(1);
}
scr.getDialog().setTitle(" " + title + " [" + osmandSettings.APPLICATION_MODE.get().toHumanString(this) + "]");
} else if(preference instanceof PreferenceScreen){
final PreferenceScreen scr = (PreferenceScreen)preference;
} else if (preference instanceof PreferenceScreen) {
final PreferenceScreen scr = (PreferenceScreen) preference;
title = scr.getTitle().toString();
scr.getDialog().setTitle(" " + title);
}
if(preference instanceof PreferenceScreen) {
final PreferenceScreen scr = (PreferenceScreen)preference;
if (preference instanceof PreferenceScreen) {
final PreferenceScreen scr = (PreferenceScreen) preference;
CustomTitleBarView titleBar = new CustomTitleBarView(title, R.drawable.tab_settings_screen_icon, null) {
@Override
public void backPressed() {
scr.getDialog().dismiss();
}
};
View titleView = getLayoutInflater().inflate(titleBar.getTitleBarLayout(), null);
titleBar.init(titleView);
// View decorView = scr.getDialog().getWindow().getDecorView();
// LinearLayout ll = new LinearLayout(titleView.getContext());
// scr.getDialog().getWindow().setContentView(ll);
// View decorView = scr.getDialog().getWindow().getDecorView();
// LinearLayout ll = new LinearLayout(titleView.getContext());
// scr.getDialog().getWindow().setContentView(ll);
View dv = scr.getDialog().getWindow().getDecorView();
ListView ls = (ListView) dv.findViewById(android.R.id.list);
if(ls != null){
if (ls != null) {
ls.addFooterView(titleView);
}
// LayoutParams lp = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
// scr.getDialog().addContentView(titleView, lp);
// ll.setOrientation(LinearLayout.VERTICAL);
// ll.addView(titleView);
// ll.addView(decorView);
// LayoutParams lp = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
// scr.getDialog().addContentView(titleView, lp);
// ll.setOrientation(LinearLayout.VERTICAL);
// ll.addView(titleView);
// ll.addView(decorView);
}
if (preference == applicationDir) {
return true;
}
@ -752,17 +760,17 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
@SuppressWarnings("unchecked")
@Override
public boolean onPreferenceClick(Preference preference) {
if(preference.getKey().equals(OsmandSettings.LOCAL_INDEXES)){
if(getMyApplication().getResourceManager().getIndexFileNames().isEmpty()) {
if (preference.getKey().equals(OsmandSettings.LOCAL_INDEXES)) {
if (getMyApplication().getResourceManager().getIndexFileNames().isEmpty()) {
startActivity(new Intent(this, OsmandIntents.getDownloadIndexActivity()));
} else {
startActivity(new Intent(this, OsmandIntents.getLocalIndexActivity()));
}
return true;
} else if(preference == bidforfix){
} else if (preference == bidforfix) {
startActivity(new Intent(this, OsmandBidForFixActivity.class));
return true;
} else if(preference == plugins){
} else if (preference == plugins) {
startActivity(new Intent(this, PluginsActivity.class));
return true;
} else if (preference == avoidRouting) {
@ -770,27 +778,26 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
getString(R.string.avoid_unpaved) }, new OsmandPreference[] { osmandSettings.AVOID_TOLL_ROADS,
osmandSettings.AVOID_FERRIES, osmandSettings.AVOID_UNPAVED_ROADS });
return true;
} else if(preference == showAlarms){
} else if (preference == showAlarms) {
showBooleanSettings(new String[] { getString(R.string.show_cameras), getString(R.string.show_speed_limits),
getString(R.string.show_lanes) },
new OsmandPreference[] { osmandSettings.SHOW_CAMERAS, osmandSettings.SHOW_SPEED_LIMITS,
osmandSettings.SHOW_LANES});
getString(R.string.show_lanes) }, new OsmandPreference[] { osmandSettings.SHOW_CAMERAS,
osmandSettings.SHOW_SPEED_LIMITS, osmandSettings.SHOW_LANES });
return true;
} else if(preference.getKey().equals("show_routing_alarms")){
} else if (preference.getKey().equals("show_routing_alarms")) {
startActivity(new Intent(this, PluginsActivity.class));
return true;
}
return false;
}
public void showBooleanSettings(String[] vals, final OsmandPreference<Boolean>[] prefs) {
Builder bld = new AlertDialog.Builder(this);
boolean[] checkedItems = new boolean[prefs.length];
for(int i=0; i<prefs.length; i++) {
boolean[] checkedItems = new boolean[prefs.length];
for (int i = 0; i < prefs.length; i++) {
checkedItems[i] = prefs[i].get();
}
bld.setMultiChoiceItems(vals, checkedItems, new OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
prefs[which].set(isChecked);
@ -799,31 +806,30 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
bld.show();
}
public static void installMapLayers(final Activity activity, final ResultMatcher<TileSourceTemplate> result){
public static void installMapLayers(final Activity activity, final ResultMatcher<TileSourceTemplate> result) {
final OsmandSettings settings = ((OsmandApplication) activity.getApplication()).getSettings();
final Map<String, String> entriesMap = settings.getTileSourceEntries();
if(!settings.isInternetConnectionAvailable(true)){
if (!settings.isInternetConnectionAvailable(true)) {
AccessibleToast.makeText(activity, R.string.internet_not_available, Toast.LENGTH_LONG).show();
return;
}
final List<TileSourceTemplate> downloaded = TileSourceManager.downloadTileSourceTemplates(Version.getVersionAsURLParam(activity));
if(downloaded == null || downloaded.isEmpty()){
if (downloaded == null || downloaded.isEmpty()) {
AccessibleToast.makeText(activity, R.string.error_io_error, Toast.LENGTH_SHORT).show();
return;
}
Builder builder = new AlertDialog.Builder(activity);
String[] names = new String[downloaded.size()];
for(int i=0; i<names.length; i++){
for (int i = 0; i < names.length; i++) {
names[i] = downloaded.get(i).getName();
}
final boolean[] selected = new boolean[downloaded.size()];
builder.setMultiChoiceItems(names, selected, new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
selected[which] = isChecked;
if(entriesMap.containsKey(downloaded.get(which).getName()) && isChecked){
if (entriesMap.containsKey(downloaded.get(which).getName()) && isChecked) {
AccessibleToast.makeText(activity, R.string.tile_source_already_installed, Toast.LENGTH_SHORT).show();
}
}
@ -834,14 +840,14 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
@Override
public void onClick(DialogInterface dialog, int which) {
List<TileSourceTemplate> toInstall = new ArrayList<TileSourceTemplate>();
for(int i=0; i<selected.length; i++){
if(selected[i]){
for (int i = 0; i < selected.length; i++) {
if (selected[i]) {
toInstall.add(downloaded.get(i));
}
}
for(TileSourceTemplate ts : toInstall){
if(settings.installTileSource(ts)){
if(result != null){
for (TileSourceTemplate ts : toInstall) {
if (settings.installTileSource(ts)) {
if (result != null) {
result.publish(ts);
}
}
@ -852,7 +858,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
}
}
});
builder.show();
}
}

View file

@ -1,7 +1,7 @@
package net.osmand.plus.extrasettings;
import java.util.EnumSet;
import net.osmand.Version;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
@ -56,7 +56,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
final MapInfoLayer mapInfoLayer = activity.getMapLayers().getMapInfoLayer();
final MapInfoControls mapInfoControls = mapInfoLayer.getMapInfoControls();
final MapInfoControlRegInfo transparent = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_transparent,
"transparent", EnumSet.of(ApplicationMode.PEDESTRIAN, ApplicationMode.DEFAULT));
"transparent", view.getSettings().TRANSPARENT_MAP_THEME);
transparent.setStateChangeListener(new Runnable() {
@Override
public void run() {
@ -67,7 +67,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
});
final MapInfoControlRegInfo fluorescent = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_fluorescent,
"fluorescent", EnumSet.noneOf(ApplicationMode.class));
"fluorescent", view.getSettings().FLUORESCENT_OVERLAYS);
fluorescent.setStateChangeListener(new Runnable() {
@Override
public void run() {
@ -96,28 +96,32 @@ public class OsmandExtraSettings extends OsmandPlugin {
cat.addPreference(activity.createCheckBoxPreference(settings.USE_HIGH_RES_MAPS,
R.string.use_high_res_maps, R.string.use_high_res_maps_descr));
cat.addPreference(activity.createCheckBoxPreference(settings.USE_TRACKBALL_FOR_MOVEMENTS,
R.string.use_trackball, R.string.use_trackball_descr));
ListPreference lp = activity.createListPreference(settings.AUDIO_STREAM_GUIDANCE,
new String[] {app.getString(R.string.voice_stream_music), app.getString(R.string.voice_stream_notification),
app.getString(R.string.voice_stream_voice_call)},
new Integer[] {AudioManager.STREAM_MUSIC, AudioManager.STREAM_NOTIFICATION, AudioManager.STREAM_VOICE_CALL},
R.string.choose_audio_stream, R.string.choose_audio_stream_descr);
final OnPreferenceChangeListener prev = lp.getOnPreferenceChangeListener();
lp.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
if (!Version.isBlackberry(activity)) {
cat.addPreference(activity.createCheckBoxPreference(settings.USE_TRACKBALL_FOR_MOVEMENTS,
R.string.use_trackball, R.string.use_trackball_descr));
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
prev.onPreferenceChange(preference, newValue);
CommandPlayer player = app.getPlayer();
if(player != null) {
player.updateAudioStream(settings.AUDIO_STREAM_GUIDANCE.get());
ListPreference lp = activity.createListPreference(
settings.AUDIO_STREAM_GUIDANCE,
new String[] { app.getString(R.string.voice_stream_music), app.getString(R.string.voice_stream_notification),
app.getString(R.string.voice_stream_voice_call) }, new Integer[] { AudioManager.STREAM_MUSIC,
AudioManager.STREAM_NOTIFICATION, AudioManager.STREAM_VOICE_CALL }, R.string.choose_audio_stream,
R.string.choose_audio_stream_descr);
final OnPreferenceChangeListener prev = lp.getOnPreferenceChangeListener();
lp.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
prev.onPreferenceChange(preference, newValue);
CommandPlayer player = app.getPlayer();
if (player != null) {
player.updateAudioStream(settings.AUDIO_STREAM_GUIDANCE.get());
}
return true;
}
return true;
}
});
cat.addPreference(lp);
});
cat.addPreference(lp);
}
PreferenceScreen appearance = (PreferenceScreen) screen.findPreference("appearance_settings");
@ -126,19 +130,5 @@ public class OsmandExtraSettings extends OsmandPlugin {
vectorSettings.setKey("custom_vector_rendering");
appearance.addPreference(vectorSettings);
// Not used any more TODO remove strings
// cat = new PreferenceCategory(app);
// cat.setTitle(R.string.extra_settings);
// appearance.addPreference(cat);
// cat.addPreference(activity.createCheckBoxPreference(settings.FLUORESCENT_OVERLAYS,
// R.string.use_fluorescent_overlays, R.string.use_fluorescent_overlays_descr));
// cat.addPreference(activity.createListPreference(settings.POSITION_ON_MAP,
// new String[] { activity.getString(R.string.position_on_map_center), activity.getString(R.string.position_on_map_bottom) },
// new Integer[] { OsmandSettings.CENTER_CONSTANT, OsmandSettings.BOTTOM_CONSTANT }, R.string.position_on_map,
// R.string.position_on_map_descr));
// cat.addPreference(activity.createCheckBoxPreference(settings.TRANSPARENT_MAP_THEME,
// R.string.use_transparent_map_theme, R.string.use_transparent_map_theme_descr));
// cat.addPreference(activity.createCheckBoxPreference(settings.SHOW_RULER,
// R.string.show_ruler_level, R.string.show_ruler_level_descr));
}
}

View file

@ -17,7 +17,6 @@ import net.osmand.plus.activities.ApplicationMode;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.activities.SettingsActivity;
import net.osmand.plus.background.OsmandBackgroundServicePlugin;
import net.osmand.plus.views.LockInfoControl;
import net.osmand.plus.views.LockInfoControl.LockInfoControlActions;
import net.osmand.plus.views.LockInfoControl.ValueHolder;
@ -106,7 +105,10 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements LockInfoCont
};
adapter.registerItem(R.string.context_menu_item_add_waypoint, R.drawable.list_activities_gpx_waypoint, listener, -1);
}
public static final int[] MINUTES = new int[]{2, 3, 5, 10, 15, 30, 45, 60, 90};
public static final int[] SECONDS = new int[] { 1, 2, 3, 5};
@Override
public void settingsActivityCreate(final SettingsActivity activity, PreferenceScreen screen) {
Preference offlineData = screen.findPreference("local_indexes");
@ -115,20 +117,25 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements LockInfoCont
} else {
offlineData.setSummary(offlineData.getSummary() + " " + app.getString(R.string.gpx_index_settings_descr));
}
PreferenceScreen grp = screen.getPreferenceManager().createPreferenceScreen(activity);
grp.setTitle(R.string.monitor_preferences);
grp.setSummary(R.string.monitor_preferences_descr);
grp.setKey("monitor_settings");
((PreferenceCategory) screen.findPreference("profile_dep_cat")).addPreference(grp);
PreferenceScreen general = (PreferenceScreen) screen.findPreference(SettingsActivity.SCREEN_ID_GENERAL_SETTINGS);
general.addPreference(activity.createEditTextPreference(settings.LIVE_MONITORING_URL, R.string.live_monitoring_url,
R.string.live_monitoring_url_descr));
// TODO remove strings
// PreferenceScreen grp = screen.getPreferenceManager().createPreferenceScreen(activity);
// grp.setTitle(R.string.monitor_preferences);
// grp.setSummary(R.string.monitor_preferences_descr);
// grp.setKey("monitor_settings");
// ((PreferenceScreen) screen.findPreference("routing_settings")).addPreference(grp);
PreferenceCategory cat = new PreferenceCategory(activity);
cat.setTitle(R.string.save_track_to_gpx);
grp.addPreference(cat);
((PreferenceScreen) screen.findPreference("routing_settings")).addPreference(cat);
cat.addPreference(activity.createCheckBoxPreference(settings.SAVE_TRACK_TO_GPX, R.string.save_track_to_gpx,
R.string.save_track_to_gpx_descrp));
cat.addPreference(activity.createTimeListPreference(settings.SAVE_TRACK_INTERVAL, new int[] { 1, 2, 3, 5, 10, 15, 20, 30 },
new int[] { 1, 2, 3, 5 }, 1, R.string.save_track_interval, R.string.save_track_interval_descr));
cat.addPreference(activity.createTimeListPreference(settings.SAVE_TRACK_INTERVAL, SECONDS,
MINUTES, 1, R.string.save_track_interval, R.string.save_track_interval_descr));
Preference pref = new Preference(activity);
pref.setTitle(R.string.save_current_track);
@ -150,14 +157,14 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements LockInfoCont
cat = new PreferenceCategory(activity);
cat.setTitle(R.string.live_monitoring);
grp.addPreference(cat);
((PreferenceScreen) screen.findPreference("routing_settings")).addPreference(cat);
cat.addPreference(activity.createCheckBoxPreference(settings.LIVE_MONITORING, R.string.live_monitoring,
R.string.live_monitoring_descr));
cat.addPreference(activity.createEditTextPreference(settings.LIVE_MONITORING_URL, R.string.live_monitoring_url,
R.string.live_monitoring_url_descr));
cat.addPreference(activity.createTimeListPreference(settings.LIVE_MONITORING_INTERVAL, new int[] { 1, 2, 3, 5, 10, 15, 20, 30 },
new int[] { 1, 2, 3, 5 }, 1, R.string.live_monitoring_interval, R.string.live_monitoring_interval_descr));
cat.addPreference(activity.createTimeListPreference(settings.LIVE_MONITORING_INTERVAL, SECONDS,
MINUTES, 1, R.string.live_monitoring_interval, R.string.live_monitoring_interval_descr));
}
@ -256,7 +263,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements LockInfoCont
final ActionItem bgServiceAction = new ActionItem();
final boolean off = !view.getSettings().SAVE_TRACK_TO_GPX.get();
bgServiceAction.setTitle(view.getResources().getString(off? R.string.monitoring_mode_off : R.string.monitoring_mode_on));
bgServiceAction.setIcon(view.getResources().getDrawable(!off?R.drawable.monitoring_rec_big:R.drawable.monitoring_rec_inactive));
bgServiceAction.setIcon(view.getResources().getDrawable(off ? R.drawable.monitoring_rec_big : R.drawable.monitoring_rec_inactive));
bgServiceAction.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -264,7 +271,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements LockInfoCont
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
vs.value = view.getSettings().SAVE_TRACK_INTERVAL.get();
li.showIntervalChooseDialog(view, view.getContext().getString(R.string.save_track_interval) + " : %s",
view.getContext().getString(R.string.save_track_to_gpx), OsmandBackgroundServicePlugin.SECONDS, OsmandBackgroundServicePlugin.MINUTES,
view.getContext().getString(R.string.save_track_to_gpx), SECONDS, MINUTES,
vs, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
@ -280,6 +287,34 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements LockInfoCont
});
qa.addActionItem(bgServiceAction);
final ActionItem liveAction = new ActionItem();
final boolean liveoff = !view.getSettings().LIVE_MONITORING.get();
liveAction.setTitle(view.getResources().getString(liveoff? R.string.live_monitoring_mode_off : R.string.live_monitoring_mode_on));
liveAction.setIcon(view.getResources().getDrawable(liveoff?R.drawable.monitoring_rec_big:R.drawable.monitoring_rec_inactive));
liveAction.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (liveoff) {
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
vs.value = view.getSettings().LIVE_MONITORING_INTERVAL.get();
li.showIntervalChooseDialog(view, view.getContext().getString(R.string.live_monitoring_interval) + " : %s",
view.getContext().getString(R.string.live_monitoring), SECONDS, MINUTES,
vs, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
view.getSettings().LIVE_MONITORING_INTERVAL.set(vs.value);
view.getSettings().LIVE_MONITORING.set(true);
}
});
} else {
view.getSettings().LIVE_MONITORING.set(false);
}
qa.dismiss();
}
});
qa.addActionItem(liveAction);
}
}

View file

@ -116,7 +116,7 @@ public class LockInfoControl {
final ActionItem lockScreenAction = new ActionItem();
lockScreenAction.setTitle(view.getResources().getString(
isScreenLocked ? R.string.bg_service_screen_unlock : R.string.bg_service_screen_lock));
lockScreenAction.setIcon(view.getResources().getDrawable(isScreenLocked ? R.drawable.lock_enabled : R.drawable.lock_disabled));
lockScreenAction.setIcon(view.getResources().getDrawable(isScreenLocked ? R.drawable.lock_disabled : R.drawable.lock_enabled));
lockScreenAction.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -144,10 +144,10 @@ public class LockInfoControl {
}
public void showIntervalChooseDialog(final OsmandMapTileView view, final String patternMsg,
String startText, final int[] seconds, final int[] minutes, final ValueHolder<Integer> v, OnClickListener onclick){
String title, final int[] seconds, final int[] minutes, final ValueHolder<Integer> v, OnClickListener onclick){
final Context ctx = view.getContext();
Builder dlg = new AlertDialog.Builder(view.getContext());
dlg.setTitle(startText);
dlg.setTitle(title);
LinearLayout ll = new LinearLayout(view.getContext());
final TextView tv = new TextView(view.getContext());
tv.setPadding(7, 3, 7, 0);

View file

@ -9,6 +9,7 @@ import java.util.Set;
import java.util.TreeSet;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.OsmandSettings.CommonPreference;
import net.osmand.plus.activities.ApplicationMode;
import android.view.View;
import android.view.ViewGroup;
@ -67,23 +68,14 @@ public class MapInfoControls {
}
public MapInfoControlRegInfo registerAppearanceWidget(int drawable, int messageId, String key,
EnumSet<ApplicationMode> appDefaultModes) {
CommonPreference<Boolean> pref) {
MapInfoControlRegInfo ii = new MapInfoControlRegInfo();
ii.defaultModes = appDefaultModes.clone();
ii.defaultModes = EnumSet.noneOf(ApplicationMode.class);
ii.defaultCollapsible = null;
ii.key = key;
ii.blPreference = pref;
ii.visibleModes = EnumSet.noneOf(ApplicationMode.class);
ii.visibleCollapsible = null;
for(ApplicationMode ms : ApplicationMode.values() ) {
boolean def = appDefaultModes.contains(ms);
Set<String> set = visibleElements.get(ms);
if(set != null) {
def = set.contains(key);
}
if(def){
ii.visibleModes.add(ms);
}
}
ii.drawable = drawable;
ii.messageId = messageId;
this.appearanceWidgets.add(ii);
@ -281,18 +273,22 @@ public class MapInfoControls {
private EnumSet<ApplicationMode> defaultCollapsible;
private EnumSet<ApplicationMode> visibleModes;
private EnumSet<ApplicationMode> visibleCollapsible;
private CommonPreference<Boolean> blPreference = null;
private Runnable stateChangeListener = null;
public int priorityOrder;
public boolean visibleCollapsed(ApplicationMode mode){
return visibleCollapsible != null && visibleCollapsible.contains(mode);
return blPreference == null && visibleCollapsible != null && visibleCollapsible.contains(mode);
}
public boolean collapseEnabled(ApplicationMode mode){
return visibleCollapsible != null;
return visibleCollapsible != null && blPreference == null;
}
public boolean visible(ApplicationMode mode){
if(blPreference != null) {
return blPreference.getModeValue(mode);
}
return visibleModes.contains(mode);
}
@ -303,6 +299,10 @@ public class MapInfoControls {
return this;
}
public void setPreference(CommonPreference<Boolean> blPreference) {
this.blPreference = blPreference;
}
public void setStateChangeListener(Runnable stateChangeListener) {
this.stateChangeListener = stateChangeListener;

View file

@ -233,7 +233,7 @@ public class MapInfoLayer extends OsmandMapLayer {
private void registerAppearanceWidgets() {
final MapInfoControlRegInfo showRuler = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_show_ruler,
"showRuler", EnumSet.allOf(ApplicationMode.class));
"showRuler", view.getSettings().SHOW_RULER);
showRuler.setStateChangeListener(new Runnable() {
@Override
public void run() {
@ -244,7 +244,7 @@ public class MapInfoLayer extends OsmandMapLayer {
});
final MapInfoControlRegInfo displayViewDirections = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_view_direction,
"viewDirection", EnumSet.of(ApplicationMode.BICYCLE, ApplicationMode.PEDESTRIAN));
"viewDirection", view.getSettings().SHOW_VIEW_ANGLE);
displayViewDirections.setStateChangeListener(new Runnable() {
@Override
public void run() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

BIN
config/logo/icon_480.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB