-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coordinates not back to model #5
Comments
Could you post your mysql table schema and model class source code ? |
Im sorry for long answer, but actually it is my mistake with validation rules. Your widget words perfectly, but one question more: |
it's very easy, you can get the hidden input value alert($('#locationpicker-coordinates').val() ); |
Oh . . I misunderstand what you mean I need read jquery-locationpick or google map document how to do that |
Try it $js = '
function(c){
var map = jQuery(c).locationpicker("map").map;
google.maps.event.addListener(map, "click", function(e) {
var marker = jQuery(c).locationpicker("map").marker;
var pos = e.latLng;
jQuery(c).locationpicker("location" , {latitude: pos.lat(), longitude: pos.lng()});
google.maps.event.trigger(marker, "dragend");
// e.stopPropagation();
});
}; then in the CoordinatesPicker add oninitialized event 'clientOptions' => [
'addressFormat' => 'street_number',
'radius' => 300,
'oninitialized' => new JsExpression($js),
], |
Ok, thank you very much!) i will try it ASAP.. Can i disable auto-render default location? |
I think it possible , Options has a "markerVisible" can be set to false. You can read all options from document http://logicify.github.io/jquery-locationpicker-plugin and try to implement your event. |
Thanks a lot, i was solve it: |
I use example for back coordinates to model, but always receive a null. Code:
In model:
... { public $coordinates; .. ..
What problem can be here?
The text was updated successfully, but these errors were encountered: