Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8466747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:26:02+00:00 2026-06-10T15:26:02+00:00

I am writing a jquery mobile app which needs a map. For the map

  • 0

I am writing a jquery mobile app which needs a map.

For the map I am planning to use Google maps service.

To account for orientation changes, I tried to use something like:

<script>
$('#page-map').live('pagecreate', function(event) {
    var map = $('#map_canvas').gmap({
        ...
    });
    ...
    $(window).resize(function() {
       $('#map_canvas').width($(window).width());
       $('#map_canvas').height($(window).height());
    });
)};
</script>

The problem: this code correctly resizes the map canvas when the device is rotated, but it looks like jquery mobile resize() is skipped (the url bar is visible, for example…).

Not even adding to the “resize(function() {” code something like this:

google.maps.event.trigger(map, 'resize');

is of any help.

UPDATE:
The issue only happens on the only mobile device I’m testing my pages – a Samsung Galaxy Mini (GT-S5570), Android 2.3.4 (Gingerbread). It does not happen when resizing window on a desktop PC (i.e: on a desktop browser map_canvas is correctly filled when browser’s window is enlarged, even without the resize() binding, only due to width/height at 100% on map_canvas…)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T15:26:03+00:00Added an answer on June 10, 2026 at 3:26 pm

    I assign a size through css to my map in jquery mobile

    I add the map_canvas inside div with dimencion deuin want in this case 100%

    CSS

    #map_content {
    padding: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;}
    
    
    #map_canvas {
    width: 100%;
    height: 100%;
    padding: 0;
    text-shadow: none;}
    

    HTML

             <div data-role="content" id="map_content" data-theme="a">
                <div id="map_content">
                    <div id="map_canvas"></div>
                </div>
            </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been toying with writing a web app using jquery mobile which makes use
I'm writing a PhoneGap(Cordova) app with jQuery and jQuery Mobile. I'm a noob, so
I'm diving into writing a mobile app with jQuery Mobile/PhoneGap. I'm using this sample
I am currently writing a small web app using Asp.net MVC and jQuery mobile.
I am writing an app with jQuery Mobile that will act as a preview
I'm currently writing a mobile app (hopefully iOS or android) using the jquery mobile
I'm writing an iPhone app using jQuery mobile & phonegap. When I rotate my
I am writing a jQuery plugin which makes use of two nested <DIV> elements.
I am in the process of writing a mobile app with the jQuery Mobile
I am writing jQuery Mobile App. I am changing drop-down selected option via below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.