Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $jsAdressLookup='js:function(request, response) {
- $("#test").gmap3({action:"getAddress", address: request.term, callback:function(results){
- if (!results) return;
- response($.map(results, function(item) {
- return {
- label: item.formatted_address,
- value: item.formatted_address,
- latLng: item.geometry.location
- }
- }));
- }
- });
- }';
- $jsAdressAddMarker='js:function(event, ui) {
- $("#test").gmap3(
- {action:"clear", name:"marker"},
- {action:"addMarker",
- latLng:ui.item.latLng,
- map:{center:true}
- }
- );
- }';
- $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
- 'name'=>'city',
- 'source'=>$jsAdressLookup,
- 'options'=>array('select'=>$jsAdressAddMarker),
- 'htmlOptions'=>array(
- 'size'=>'40'
- ),
- ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement