flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [2/2] git commit: [flex-asjs] [refs/heads/develop] - Updated Map example with a few styles.
Date Tue, 03 Jun 2014 21:08:52 GMT
Updated Map example with a few styles.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/103ecbbd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/103ecbbd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/103ecbbd

Branch: refs/heads/develop
Commit: 103ecbbd599f992317c5420e7c9471ce1a8e6192
Parents: 5cf4dd9
Author: Peter Ent <pent@apache.org>
Authored: Tue Jun 3 17:08:39 2014 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Tue Jun 3 17:08:39 2014 -0400

----------------------------------------------------------------------
 examples/MapSearch/src/MyInitialView.mxml | 84 ++++++++++++++------------
 1 file changed, 44 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/103ecbbd/examples/MapSearch/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/MapSearch/src/MyInitialView.mxml b/examples/MapSearch/src/MyInitialView.mxml
index 3478abd..52c2355 100644
--- a/examples/MapSearch/src/MyInitialView.mxml
+++ b/examples/MapSearch/src/MyInitialView.mxml
@@ -43,19 +43,6 @@ limitations under the License.
 				map.addEventListener("dragEnd", onMapCenteredOrChanged);
 			}
 			
-			/**
-			 * Take the values from the input field and have the map
-			 * display that coordinate.
-			 */
-			private function mapIt() : void
-			{
-//				var lat:Number = Number(latInput.text);
-//				var lng:Number = Number(longInput.text);
-//				var zoom:Number = Number(zoomInput.text);
-				
-//				map.loadMap(lat, lng, zoom);
-			}
-			
 			private var selectedCity:String;
 			
 			/**
@@ -65,21 +52,18 @@ limitations under the License.
 			private function changeCity(event:org.apache.flex.events.Event) : void
 			{
 				var index:int = list.selectedIndex;
-				
-				var latlng:Object = MyModel(applicationModel).coordinates[index];
-				map.loadMap(latlng.lat, latlng.lng, 10);
+				mapLocation.text = MyModel(applicationModel).cities[index];
+				codeAddress();
 			}
 			
 			private function codeAddress() : void
 			{
 				map.markAddress(mapLocation.text);
-				//map.setZoom(12);
 			}
 			
 			private function searchOnMap() : void
 			{
 				map.nearbySearch(search.text);
-				//map.setZoom(12);
 			}
 			
 			private function clearSearchResults() : void
@@ -91,7 +75,6 @@ limitations under the License.
 			private function orientMap() : void
 			{
 				map.centerOnAddress(mapLocation.text);
-				//map.setZoom(12);
 			}
 			
 			private function onMapCenteredOrChanged(event:org.apache.flex.events.Event):void
@@ -118,6 +101,36 @@ limitations under the License.
 	<fx:Style>
 		@namespace basic "library://ns.apache.org/flexjs/basic";
 	
+		.FormLabel {
+			font-weight: bold;
+			font-size: 12;
+			margin-left: 8px;
+			margin-right: 8px;
+		}
+		
+		.FormButton {
+			font-weight: bold;
+			font-size: 12;
+			color: #000000;
+			background-color: #FFFFFF;
+			border-style: solid;
+			padding-top: 2px;
+			padding-bottom: 2px;
+			padding-left: 8px;
+			padding-right: 8px;
+		}
+		
+		.FormInput {
+			font-weight: normal;
+			font-size: 12;
+			color: #0000DE;
+			padding: 6px;
+		}
+		
+		.InnerBox {
+			margin-top: 10px;
+			margin-bottom: 5px;
+		}
 	</fx:Style>
 	
 	<basic:beads>
@@ -130,29 +143,31 @@ limitations under the License.
 			<basic:NonVirtualVerticalLayout />
 		</basic:beads>
 		
-		<basic:Container>
+		<basic:Container className="InnerBox">
 			<basic:beads>
 				<basic:NonVirtualHorizontalLayout />
 			</basic:beads>
-			<basic:Label text="Location:" />
-			<basic:TextInput id="mapLocation" />
-			<basic:TextButton text="Go" click="orientMap()" />
+			<basic:Label text="Location:" className="FormLabel" />
+			<basic:TextInput id="mapLocation" className="FormInput" />
+			<basic:TextButton text="Go" click="orientMap()" className="FormButton" />
 			
 			<basic:DropDownList id="list" width="100" height="17"
 								change="changeCity(event)"
 								dataProvider="{MyModel(applicationModel).cities}" />
 		</basic:Container>
 		
-		<basic:Map id="map" width="450" height="300" token="AIzaSyDkQgg2iojLCYeuW6hK7DkuAHD-SwJJhdE"
ready="onMapReady()"/>
+		<basic:Map id="map" width="450" height="300" className="MainMap"
+				   token="AIzaSyDkQgg2iojLCYeuW6hK7DkuAHD-SwJJhdE" 
+				   ready="onMapReady()"/>
 		
-		<basic:Container>
+		<basic:Container className="InnerBox">
 			<basic:beads>
 				<basic:NonVirtualHorizontalLayout />
 			</basic:beads>
-			<basic:Label text="Search on Map:" />
-			<basic:TextInput id="search" />
-			<basic:TextButton text="Find" click="searchOnMap()" />
-			<basic:TextButton text="Clear" click="clearSearchResults()" />
+			<basic:Label text="Search on Map:" className="FormLabel" />
+			<basic:TextInput id="search" className="FormInput" />
+			<basic:TextButton text="Find" click="searchOnMap()" className="FormButton" />
+			<basic:TextButton text="Clear" click="clearSearchResults()" className="FormButton"
/>
 		</basic:Container>
 		
 		<basic:List id="resultsList" width="450" height="200">
@@ -164,17 +179,6 @@ limitations under the License.
 					destinationPropertyName="dataProvider" />
 			</basic:beads>
 		</basic:List>
-				
-<!--		<basic:Label text="Lat:" />
-		<basic:TextInput id="latInput" text="-34.397" />
-		
-		<basic:Label text="Long:" />
-		<basic:TextInput id="longInput" text="150.644" />
-		
-		<basic:Label text="Zoom:" />
-		<basic:TextInput id="zoomInput" text="8" />
-		
-		<basic:TextButton text="MapIt" click="mapIt()" /> -->
 		
 	</basic:Container>
 


Mime
View raw message