Git Product home page Git Product logo

Comments (2)

sgruhier avatar sgruhier commented on July 16, 2024

Thanks for appreciating this widget.
If I have time, I'll do a full rewrite with new Google API!

For your issue, it looks hackish but just add this

google.maps.event.trigger($("#addresspicker_map").addresspicker("marker"), "dragend");

After you addresspicker initialisation, it should make it.

from jquery-addresspicker.

mrcharis avatar mrcharis commented on July 16, 2024

Hi there
Thanks for your reply
I used the code you supplied and now the address box has the initial current location (that I set as the center point) Works really great

I am still trying to load the geolocation, my current location as the center of the map, but having trouble getting it to work

I can retrieve the current location, but I cannot get the location to load into the address picker before the map appears , and so I have no map showing

This is the code I am using

window.onload=function(){
if(navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
else
{
alert("Geolocation is not supported by this browser.");
}
}
function showPosition(pos){
alert("Latitude: "+pos.coords.latitude+"\nLongitude: "+pos.coords.longitude);


  var lat = startPos.coords.latitude;
  var long = startPos.coords.longitude;

}

\\ then I use the variables to set the center point
 center: new google.maps.LatLng(lat , long ),

problem is it doesn' work

Do you have any idea how to get it working?

Any help would be great, and would be a good addition to your plugin for future users

Thanks again

Have a nice day

from jquery-addresspicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.