Also: just came across this mapping example, using Leaflet, and a 
standards-based approach (POST via WFS) to write point data from the map to 
a database:

http://blog.georepublic.info/2012/leaflet-example-with-wfs-t/
https://github.com/Georepublic/leaflet-wfs/blob/master/index.html#L201  
(POST code)


On Wednesday, 5 June 2013 09:37:21 UTC+2, Derek wrote:
>
> Your question seems to be more about using javascript with Django; have a 
> look at this Q&A:
>
> http://stackoverflow.com/questions/5735107/basic-django-and-javascript-question
> There is also a lonk to a downloadable sample app.
>
> The "getting the values from the map via javascript" is a different kind 
> of problem altogether; you'd need to ask about that on a javascript forum.
>
> On Tuesday, 4 June 2013 18:25:17 UTC+2, roopas...@gmail.com wrote:
>>
>> Vermon D. Cole,How to get the latitude and longitude from 
>> javascript(using javascript map) and save it to database in Django.If 
>> marker is placed  in any place,it will show/display the longitude and 
>> latitude value,need to get that and save in in db.Hope this clear.
>>
>> Thanks 
>>
>> On Tuesday, June 4, 2013 9:36:17 PM UTC+5:30, Vernon D. Cole wrote:
>>>
>>>
>>> Saving the values is the easy part.  The format you use depends on what 
>>> you want to do with them.  If you are only displaying them to users, 
>>> CharField might be okay.  If you are going to do any processing, you should 
>>> probably convert them.  My storage is done like this:
>>>
>>>     gpsLatitude = models.FloatField("Latitude", blank=True, null=True,
>>>>         help_text="degrees, floating point, South is negative")
>>>>     gpsLongitude = models.FloatField("Longtitude", blank=True, 
>>>> null=True,
>>>>         help_text="degrees, floating point, West is negative")
>>>>
>>>
>>> Getting the values may be a problem. I do not understand what you mean 
>>> by "displayed in map using marker".  Is what you have is a graphical image 
>>> with a marker icon somewhere on it?  Or are you using a Google api which  
>>> can be asked to give you more information?
>>> --
>>>
>>> On Tuesday, June 4, 2013 1:49:06 PM UTC+1, Sivaram R wrote:
>>>>
>>>> models.py
>>>>
>>>> class Geolocation(models.Model):
>>>>     user = models.ForeignKey(User, null=False)
>>>>     location_latitude = models.CharField('Latitude', max_length=20, 
>>>> null=True, blank=True)
>>>>     location_longitude = models.CharField('Longitude', max_length=20, 
>>>> null=True, blank=True)
>>>>
>>>> In my application,i am using google map using Javascript.Latitude and 
>>>> longitude values are displayed in map using marker,i need to get both 
>>>> values from map and save to database using Python.
>>>>
>>>> 1.I want to know how to get the values from map and save.
>>>>
>>>> 2.How to right view function and form.
>>>>
>>>>
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to