Skip to content
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

Working with bootstrap modal #20

Closed
vaibhav3011 opened this issue Sep 28, 2014 · 10 comments
Closed

Working with bootstrap modal #20

vaibhav3011 opened this issue Sep 28, 2014 · 10 comments

Comments

@vaibhav3011
Copy link

Hi,
I want to show locationpicker in bootstrap modal. But I am unable to show map in modal.
Can you guide me how I can do that.

Thanks

@corvis
Copy link
Member

corvis commented Sep 29, 2014

Hi,
Checkout this ticket: #7

@hydropik
Copy link

hydropik commented Oct 1, 2014

Hi,

for me it's the same in Bootstrap Modal the map is small at top left corner and autocomplete doesn't work even with: "enableAutocomplete: true"
After multiple try I don't have a solution

Thanks

@hydropik
Copy link

hydropik commented Oct 2, 2014

I have found a solution for the map issue but the autocomplete still doesn't work
Solution:

$('#modal').on('shown.bs.modal', function (e) {
    $('#maps').locationpicker({
        location: {latitude: 46.0, longitude: 6.50},   
        radius: 150,
        enableAutocomplete: true,
        inputBinding: {
            latitudeInput: $('#id'),
            longitudeInput: $('#id'),
            radiusInput: $('#id'),
            locationNameInput: $('#id')
        }
    });
}

@hydropik
Copy link

hydropik commented Oct 6, 2014

Solution for autocomplete:

.pac-container {
    background-color: #FFF;
    z-index: 20;
    position: fixed;
    display: inline-block;
    float: left;
}
.modal{
    z-index: 20;   
}
.modal-backdrop{
    z-index: 10;        
}​

@corvis
Copy link
Member

corvis commented Jan 4, 2015

Also since version 0.1.12 it is possible to use "autosize" method to fix map widget:

$('#us6-dialog').on('shown.bs.modal', function() {
    $('#us3').locationpicker('autosize');
});

@adgfx
Copy link

adgfx commented Jan 20, 2015

Hi Corvis,
I am displaying my company location by default. Need a 'reset' button to fly back to the initial position at anytime. Is there an option? maybe $(#id).locationpicker('reset'); !!!
Thanks,
AJ

@hydropik
Copy link

Hi all,
I need a reset button too, like you adgfx.
Does it possible to add this function to the next release?
Thanks,
LR

@9px
Copy link

9px commented Feb 28, 2015

for solving the problem of autocomplete (auto-suggest) in bootstrap modal, only add this code to the last line of style:

.pac-container{z-index:2000 !important;}

@subhanahmed047
Copy link

@Sumragen
Copy link
Contributor

@IncredibleX hi! Answer at your question is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants