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

Map did not load in Jquery tabs #8

Open
sehrish-iftikhar opened this issue Nov 6, 2015 · 3 comments
Open

Map did not load in Jquery tabs #8

sehrish-iftikhar opened this issue Nov 6, 2015 · 3 comments

Comments

@sehrish-iftikhar
Copy link

I am using tabs based html structure.I am using this plugin in second tab.Map didn't load completely.I call the map init function on tab click event and it load map completely on first click.When i re-switch tabs it again loaded partially.

I tried many solution and also resize map
google.maps.event.trigger(map_object, "resize");

but no success.Please help me how to properly insert map resize or any other solution.

Thanks,

@sehrish-iftikhar sehrish-iftikhar changed the title Map didnot load in Jquery tabs Map did not load in Jquery tabs Nov 11, 2015
@abhishekdgeek
Copy link

Any luck here? I am facing the same issue. Just that I am having 3 page long form and maps only work on first page.

For me the map just have a grey color box with no map itself.

Thanks,
Abhishek Jain

@sehrish-iftikhar
Copy link
Author

sehrish-iftikhar commented Nov 11, 2016

Yes, it is resolved. It's map resizing issue. The Map is not loaded in jQuery tabs due to height parameter issue. You need to load the map on tab click event.

I am sharing the sample code. It initializes the map when location tab is clicked.

$(document).ready(function () {
$("#location-tab").on("click", function () {
(new GMapsLatLonPicker()).init($(this));
});
});

Let me know if you need any further assistance.

Thanks,

@abhishekdgeek
Copy link

Thanks. :)

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

2 participants