flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Modification to map example that includes searching. Work in progress.
Date Wed, 28 May 2014 13:40:46 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop 0c58c7c9d -> 04b995459


Modification to map example that includes searching. Work in progress.


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

Branch: refs/heads/develop
Commit: 04b995459ba7f84a5169f9f7d4783e143ed82be4
Parents: 0c58c7c
Author: Peter Ent <pent@apache.org>
Authored: Wed May 28 09:40:36 2014 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed May 28 09:40:36 2014 -0400

----------------------------------------------------------------------
 examples/DesktopMap/src/MyInitialView.mxml | 57 ++++++++++++++++++++++---
 1 file changed, 51 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04b99545/examples/DesktopMap/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/DesktopMap/src/MyInitialView.mxml b/examples/DesktopMap/src/MyInitialView.mxml
index 4cdfa10..22971db 100644
--- a/examples/DesktopMap/src/MyInitialView.mxml
+++ b/examples/DesktopMap/src/MyInitialView.mxml
@@ -63,6 +63,29 @@ limitations under the License.
 				longInput.text = String(latlng.lng);
 			}
 			
+			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
+			{
+				map.clearSearchResults();
+			}
+			
+			private function orientMap() : void
+			{
+				map.centerOnAddress(mapLocation.text);
+				map.setZoom(12);
+			}
+			
 		]]>
     </fx:Script>
 	
@@ -81,6 +104,34 @@ limitations under the License.
 			<basic:NonVirtualVerticalLayout />
 		</basic:beads>
 		
+		<basic:Container>
+			<basic:beads>
+				<basic:NonVirtualHorizontalLayout />
+			</basic:beads>
+			<basic:Label text="Location:" />
+			<basic:TextInput id="mapLocation" />
+			<basic:TextButton text="Go" click="orientMap()" />
+		</basic:Container>
+		
+		<basic:Map id="map" width="450" height="300" token="AIzaSyDkQgg2iojLCYeuW6hK7DkuAHD-SwJJhdE"
/>
+		
+		<basic:Container>
+			<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:Container>
+		
+		<basic:Label text="History:" />
+		
+		<!--<basic:List id="historyList" />-->
+		<basic:DropDownList id="list" width="100" height="17"
+							change="changeCity(event)"
+							dataProvider="{MyModel(applicationModel).cities}" />
+		
 		<basic:Label text="Lat:" />
 		<basic:TextInput id="latInput" text="-34.397" />
 		
@@ -91,12 +142,6 @@ limitations under the License.
 		<basic:TextInput id="zoomInput" text="8" />
 		
 		<basic:TextButton text="MapIt" click="mapIt()" />
-		
-		<basic:DropDownList id="list" width="100" height="17"
-							change="changeCity(event)"
-							dataProvider="{MyModel(applicationModel).cities}" />
 	</basic:Container>
 
-	<basic:Map id="map" x="150" y="25" width="300" height="300" />
-
 </basic:ViewBase>


Mime
View raw message