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

  • Home
  • SEARCH
  • 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 9227229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:01:13+00:00 2026-06-18T05:01:13+00:00

Trying to create a PhoneGap mobile app. Totally new to mobile apps, phonegap, and

  • 0

Trying to create a PhoneGap mobile app. Totally new to mobile apps, phonegap, and JS so bear with me. This is where I’m at:

 <script type="text/javascript">
 function initialize() {
    var mapOptions = {
      center: new google.maps.LatLng(40.710,-73.994), //New york, NY
      zoom: 8,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        mapOptions)
};

With that, the map renders in the browser just fine. When adding the following that I’ve found in a number of tutorials it refuses to render anything. I am trying to do all of this in the googlemap/index.html page that I have created.

<script type="text/javascript">
 function initialize() {
    var mapOptions = {
      center: new google.maps.LatLng(40.710,-73.994), //New york, NY
      zoom: 8,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        mapOptions);
    var LatLng = new google.maps.LatLng(40.710,-73.994)
    var marker = new.google.maps.Marker({
        position: myLatLng,
        title: "hello world!"
        });
    marker.setMap(map);
};

When I add the following, the entire page refuses to render.

Basically, I’m using the above method to display a google map, and I’m trying to add a pin to the center location. Seems simple enough but proving to be beyond my abilities.

  • 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-18T05:01:15+00:00Added an answer on June 18, 2026 at 5:01 am

    You have a syntax error on this line:

    var marker = new.google.maps.Marker({
    

    Notice that there is a dot between the new operator and the class name.

    To fix, replace the line above with:

    var marker = new google.maps.Marker({
    

    Happy mapping!

    PS: The error was reported in the (desktop) browser’s console, I’m not sure how you’d see the same on an Android device.

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

Sidebar

Related Questions

I'm trying to PhoneGap (1.7.0) a jQuery Mobile app (1.1.0) I have to create
Trying to create a starter app with PhoneGap. I'm stuck on this line: navigator.device.capture.captureAudio(onSuccess,
I am trying to build a mobile app with JQuery Mobile and PhoneGap. This
Trying to create a PhoneGap app using the canvas tag on an iPad. The
I am trying to Create pages with DIVs dynamically for my phonegap app from
I am trying to create an iPad app using PhoneGap.. Now while I know,
I'm trying out PhoneGap in Visual Studio. If I create an app and allow
I'm new to Blackberry. I use phonegap to create cross platform applications. I'm trying
I'm trying to create an app using phonegap and localStorage, it works well on
I'm trying to create an Android (2.2) app using Phonegap (version 1.9.0) and jQuery

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.