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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:44:53+00:00 2026-06-09T11:44:53+00:00

I am hacking around with gmap3 managing to get the first task working. Showing

  • 0

I am hacking around with gmap3 managing to get the first task working. Showing the map using a lat long.

My javascript look likes

  $('#map_canvas').gmap3(
                    {
                        action: 'init',
                        options: {
                            center: [x,y],
                            zoom: 12,
                            mapTypeId: google.maps.MapTypeId.ROADMAP,
                            mapTypeControlOptions: {
                                mapTypeIds: []
                            }
                        }
                    },
                    {
                        action: 'addMarkers',
                        radius: 100,
                        markers: GetMarkers(),
                        clusters:
                        {
                            0:
                                {
                                    content: '<div class="cluster cluster-3">CLUSTER_COUNT <div class="cluster-3text">Stops</div> </div>',
                                    width: 66,
                                    height: 65
                                }
                        },
                        marker:
                        {
                            options:
                            {
                                icon: new google.maps.MarkerImage('../img/marker.png', size, origin, null, null)
                            },
                            events:
                            {
                                mouseover: function (marker, event, data) {
                                                                        getArrivalsAndStop(marker, event, data);
                                },
                                mouseout: function () {
                                    $(this).gmap3({ action: 'clear', name: 'overlay' });
                                }
                            }
                        }
                    });

This loads the map how I want. My next step is to be able apply a new lat & long. How can I do this without destroying the whole map and recreating it everytime?

  • 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-09T11:44:54+00:00Added an answer on June 9, 2026 at 11:44 am

    From the documentation:

    This example executes map.setCenter with the result of the address resolution, target is not specified because this is the map.

    $('#test').gmap3(
    { 
      action: 'getLatLng',
      address: '2 bis rue saint antoine, eguilles',
      callback: function(result){
        if (result){
          $(this).gmap3({action: 'setCenter', args:[ result[0].geometry.location ]});
        } else {
          alert('Bad address 2 !');
        }
      }
    

    });

    So it looks like if you know the coordinates and don’t need to use the geocoder, it would be:

         $(this).gmap3({action: 'setCenter', args:[ new google.maps.LatLng(latitude, longitude) ]});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been hacking around with Ruby a little and I have been wondering if
I've started hacking together a little application for managing a list of addresses and
Whether using error_reporting(0) in php script will prevent hacking using SQLi or XSS by
I was hacking around trying to make a basic orm that has support for
I am hacking together a theme for Wordpress and I am using the following
Alright, I've been hacking around with GD Image for a couple of months, and
Hello I am trying to find a way around using the nasty align=center trick..
I'm hacking around in some scripts trying to parse some data written by Javas
I'm hacking around with RoR to test devise and omniauth integration. I now have
Ive been around the hacking block where I see people able to pull out

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.