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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:28:15+00:00 2026-05-22T20:28:15+00:00

When I using this code <li latlon=58.55801847109299,11.244826413745159 class=point_on_map>Boviken, Hamburgö</li> And this jQuery code: $(‘.point_on_map’).click(function(){

  • 0

When I using this code

<li latlon="58.55801847109299,11.244826413745159" class="point_on_map">Boviken, Hamburgö</li>

And this jQuery code:

$('.point_on_map').click(function(){
    var b = new google.maps.LatLng($(this).attr('latlon'));
    map.setCenter(b);
});

And when I click the center is in the blue, and the marker is in the left upper corner, and not draggable…
What have is wrong?

  • 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-22T20:28:16+00:00Added an answer on May 22, 2026 at 8:28 pm

    What you’re actually doing there is passing one string to LatLng when you need to be passing it two. That comma in the latlon attribute doesn’t get interpretted by JavaScript how you’re thinking it does, it just gets seen as part of the string.

    You need to split your 58.55801847109299,11.244826413745159 into two variables (e.g. 58.55801847109299 and 11.244826413745159) and pass them separately to LatLng. e.g.

    var latlon = $(this).attr('latlon');
    var latlon_array = latlon.split(',');
    var lat = latlon_array[0];
    var lon = latlon_array[1];
    var b = new google.maps.LatLng(lat,lon);
    

    That’s untested code but hopefully you get the idea.

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

Sidebar

Related Questions

Using this code v=new Date(); var bxx=document.getElementById('bxx'); function t(){ n=new Date(); ss={time}; s=ss-Math.round((n.getTime()-v.getTime())/1000.); m=0;h=0;
I Using this code <script type=text/javascript> $(function() { $('#DoTask').click(function(event) { event.preventDefault(); // added this
Using this code: $.each(data.toptracks.track, function(index, item){ $('.lastfm').append('<figure class=clearfix><p><a href='+item.url+'>'+item.name+'</a>'+item.artist.name+'</p><div class=vinyl><img class=recordLabel src=' + item.image[3]['#text']
Im using this code for mysql connection $con = mysql_connect(localhost:/var/lib/mysql/mysql.sock, abc , xyz); if
While using this code to serialize an object: public object Clone() { var serializer
When using this code (simplified for asking): var rows1 = (from t1 in db.TABLE1
Using this code: var pendingRequest = new Ajax.Request(myUrl, { method: 'post', postBody: soapMsg, contentType:
using this code: public class DvdRomUtility { [DllImport(winmm.dll, EntryPoint = mciSendStringA, CharSet = CharSet.Ansi)]
using this code: <h2 id=status> 0, 0 </h2> <script type=text/javascript> $('html').mousemove(function(e){ $('#status').html(e.pageX +', '+
Im using this code to restrict the user to not enter special characters $(input).keyup(function(){

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.