开发者

Pop-up A map to get user's location in Django

开发者 https://www.devze.com 2023-04-02 11:46 出处:网络
I\'m Implementing a simple 开发者_如何学Cweb app using Django, I want to get user\'s location by clicking on a Google map, but I don\'t want him to open another page to open the map while registering,

I'm Implementing a simple 开发者_如何学Cweb app using Django, I want to get user's location by clicking on a Google map, but I don't want him to open another page to open the map while registering, I want the map to popup inside the same page he is registering at, can you tell me please the best way to achieve such a popup? I want a cohesive trick so I can replace the map on such a popup and put any HTML instead, thank you in advance :)


display a <div> using JQuery with position:absolute and use top and left properties to move the div into position. set padding internally, then use google maps API to spawn a map in there. Use JS to post the placemark to a hidden url of your site. then use django GIS to store the positional information

  • http://www.jquery.org <- JQuery
  • http://code.google.com/apis/maps/documentation/javascript/ <- Maps API
  • https://docs.djangoproject.com/en/dev/ref/contrib/gis/ <- GeoDjango

If you have a specific question about the use of these tools, ask again.

0

精彩评论

暂无评论...
验证码 换一张
取 消