Coder Social home page Coder Social logo

Comments (9)

madisona avatar madisona commented on August 20, 2024

Can you post any more info? And do you have GOOGLE_MAPS_API_KEY = '<SAMPLE_KEY>' set to an appropriate value in your settings?

from django-google-maps.

mykljohn avatar mykljohn commented on August 20, 2024

Sure,
yes I have my API key.

in my model:
address = map_fields.AddressField(max_length=200)
location = map_fields.GeoLocationField(max_length=200)

in admin:
formfield_overrides = {
map_fields.AddressField: {'widget': map_widgets.GoogleMapsAddressWidget},
}

The Admin screen comes up and displays the fields and the map in Satellite view (can I change that and center it on a location?) When I enter a city name, it pops up that error msg.

from django-google-maps.

madisona avatar madisona commented on August 20, 2024

the project expects to update a field #id_geolocation. It looks like you named the field location in your model.

You can try either changing the field name to be geolocation or explicitly set the html id to be id_geolocation.

from django-google-maps.

mykljohn avatar mykljohn commented on August 20, 2024

ah ok, same problem. New model:
address = map_fields.AddressField(max_length=200)
geolocation = map_fields.GeoLocationField(max_length=200)

from django-google-maps.

madisona avatar madisona commented on August 20, 2024

what is the address you're trying to geocode?

from django-google-maps.

mykljohn avatar mykljohn commented on August 20, 2024

I just put in the city "Queretaro" without quotes :)

from django-google-maps.

mykljohn avatar mykljohn commented on August 20, 2024

and I tried New York...same thing

from django-google-maps.

madisona avatar madisona commented on August 20, 2024

do you get the same result if you just pull down the django-google-maps project and run the included sample application?

I just pulled it down and ran the sample app without issues on python 27 and django 1.11. both "New York" and "Queretaro" behave as I'd expect.

from django-google-maps.

mykljohn avatar mykljohn commented on August 20, 2024

Sorry, I'll try it this weekend.

from django-google-maps.

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.