Closed michaelhjulskov closed 6 years ago
please help. i still dont know how to trigger: -center map on x,y point (via jquery/js) -set marker on x,y point (via jquery/js)
I have searched, a lot! I hope someone can just give me a hint how i should do this, please :)
here is my latest attempt - form field name is 'location'
var locationRio = {lat: -22.915, lng: -43.197};
var marker = new google.maps.Marker({
position: locationRio,
map: $("#location-map-elem").map,
title: 'Hello World!'
});
If you visit https://dev.maxmind.com/geoip/legacy/geolite/ and Maxmind has announced that discontinue of coordinates in GeoLite2 in 2019. Will it impact the function of RegisterView which is using coordinates?
Hi :)
In my Sign up form I want my mapwidget to attempt to center as near as possible to the user. I use GeoIP.
The code inside my RegisterView looks something like this:
so now i need to find a way to implement center_here in my html template form and how to trigger mapwidget to center the map there. anyone have an idea how to trigger map to be centered on center_here point thanks :)
By the way if anybody want to copy my method above, remember to download the data files from: https://dev.maxmind.com/geoip/legacy/geolite/ and add GEOIP_PATH to your settings file read more about GeoIP here: https://docs.djangoproject.com/en/1.11/ref/contrib/gis/geoip/ or GeoIP2 read here: https://docs.djangoproject.com/en/2.0/ref/contrib/gis/geoip2/