Google Maps and Jquery problems

Asked

Viewed 490 times

1

I’m setting up a site with jQuery UI and google maps. My map div is inside another Jquery div (tab). I don’t know if there is a conflict between jquery-ui and google maps, because it doesn’t only show a gray box with zoom controls and street view, but the map doesn’t render.

I’ve done a lot of research on the net and I can’t find a viable solution, the closest I came to a solution was to use a resize google, but it’s not working either.

When I take the div from the map inside the TAB divs of Jquery everything works, but the site gets a mess. I’m using this plugin for the map: jquery-ui-map.

<script type="text/javascript">
    function carrega_map() {
        // Also works with: var yourStartLatLng = '59.3426606750, 18.0736160278';
        var yourStartLatLng = new google.maps.LatLng(59.3426606750, 18.0736160278);
        $('#map_canvas').gmap({'center': yourStartLatLng});
    }
</script>
  • Google has a limit of views per day, when it exceeds this period, it creates a gray box, you need to create an API key and enable, I recommend that you use a secure ssl version: https://maps-api-ssl.google.com/maps/apis/js?v=3&sensor=false&language=pt-br&libraries=Places

  • Nothing appears on the console? Consider including a mcve, this way it becomes difficult to reproduce.

  • Could show what appears on the console?

  • 1

    Dear ones, thanks for the answers...I ended up changing the map plugin using now a called Gmap... but the problem persisted after a lot of research discover that it was a problem in defining the width and Heigh attributes of the div where the map will be rendered.

  • the software is still in development .. soon be in production I will put the link here for you to know the work and if possible help to publicize...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.