Code Monkey home page Code Monkey logo

Comments (2)

erdem avatar erdem commented on August 17, 2024

Hi Elger,

I would like to add this patch, but it is really hard to get a new release for this project at the moment. Bunch of things waiting in v0.2.0 branch to release. I have to deal with them first.

The best thing you need to do in this case, you need to fork the project and update the related methods then you can install your version from your Github repository.

like this:
pip install git+git://github.com/<your-github-username>/django-map-widgets.git@master

var place = autocomplete.getPlace();

You need to update this method passing geocoding full response to JS triggers. Feel free to send your changes within a pull-request for the project.

Thanks

from django-map-widgets.

erdem avatar erdem commented on August 17, 2024

The geocoding handler binding the full response object to the JS triggers in v0.2.0 version.

$(document).on("google_point_map_widget:marker_create", 
    function (e, place, lat, lng, locationInputElem, mapWrapID) {
        console.log(place); // Google geocoding response object
        console.log(locationInputElem); // django widget textarea widget (hidden)
        console.log(lat, lng); // created marker coordinates
        console.log(mapWrapID); // map widget wrapper element ID
});

$(document).on("google_point_map_widget:marker_change", 
    function (e, place, lat, lng, locationInputElem, mapWrapID) {
        console.log(place); // Google geocoding response object
        console.log(locationInputElem); // django widget textarea widget (hidden)
        console.log(lat, lng);  // changed marker coordinates
        console.log(mapWrapID); // map widget wrapper element ID
});

$(document).on("google_point_map_widget:marker_delete", 
    function (e, lat, lng, locationInputElem, mapWrapID) {
        console.log(locationInputElem); // django widget textarea widget (hidden)
        console.log(lat, lng);  // deleted marker coordinates
        console.log(mapWrapID); // map widget wrapper element ID
});

from django-map-widgets.

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.