inputEx - MapField Usage

Google Maps MapField creation

Use the following code to create a inputEx MapField for Google Maps.

		

			var id = 'container3';
			var api = 'google';
			var elExample3 = new Y.inputEx.MapField({
				parentEl: id,
				name: 'mapField',
				width: '800px',
				api: api,
				// choose between HYBRID,ROADMAP,SATELLITE,TERRAIN
				mapType : "ROADMAP",
				lat : 48.85, 
				lon : 2.3, 
				uzoom : 8
			});

			var elButton3 = inputEx.cn('button', null, null, "getValue");
		 	Y.one(elButton3).on('click', function() {
				alert( Y.JSON.stringify(elExample3.getValue()) );
			});
			Y.one('#'+id).appendChild(elButton3);