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 7413005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:37:44+00:00 2026-05-29T06:37:44+00:00

I am trying to build a JQuery Mobile application. I want this application to

  • 0

I am trying to build a JQuery Mobile application. I want this application to include a Google map in it. I was basing my implementation on the jquery-ui-map plugin. They have sample code available at http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-google-maps-mobile.html#basic_map.

Even with that example, I still can’t get a map to appear. I feel like I’m using the most basic code. Can somebody please tell me what I’m doing wrong? My code is shown below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/resources/scripts/jquery.ui.map.full.min.js" />
</head>

<body>
    <div id="result" data-role="page">
        <div data-role="header"><h1>My App</h1></div>

        <div data-role="content">
          <div id="resultMap" style="height:200px; width:200px; background-color:Lime;">   
          </div>
        </div>
    </div>

    <br /><br />

    <script type="text/javascript">
        $("#result").live("pageshow", function () {
            $("#resultMap").gmap();
        });
    </script>
</body>
</html>
  • 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-05-29T06:37:45+00:00Added an answer on May 29, 2026 at 6:37 am

    Ok. I’m doing it like this:

    var home = new google.maps.LatLng(x, y);
    
    $('#directions_map').live("pageshow", function() {
        $('#map_canvas_1').gmap('refresh');
        });
    
    $('#directions_map').live("pagecreate", function() {
        $('#map_canvas_1').gmap({'center': home, 'zoom':17 });
        $('#map_canvas_1').gmap('addMarker', { 'position': home, 'animation' : google.maps.Animation.DROP } );
        });
    

    So please try:
    – create the gmap on pagecreate
    – only refresh on pageshow
    – the marker is a bonus 😉

    let me know if this does the trick. It’s from a working example of mine, so it should be ok. I think it’s important you set up the gmap ahead of pageshow. If you think of JQM as a stage… pageshow would be right before lifting the curtain. Maybe too late for Google Magic. Pagecreate seems better…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build an autocomplete using jQuery plugin autocomplete from this site .
I'm trying to build a mobile application with PhoneGap, jQuery Mobile and Backbone.js on
I'm trying to build a simple jquery plugin that can take selectors as parameters.
I'm trying to build a jQuery plugin that allows you to drag and draw
I have a web application built with jQuery Mobile and PHP (CodeIgniter framework). Now
JQuery Mobile is making my cry tonight. I'm trying to build custom controls so
I'm trying to build a jQuery plugin that filters the provided jQuery object to
I'm trying to wrap my head around jQuery Mobile. My aim is to build
I'm trying to build a jquery dropdown menu, basically I have the left navigation
I'm trying to build in jQuery mobile a simple "store location" service, where in

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.