Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8333379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:00:49+00:00 2026-06-09T03:00:49+00:00

So…i have used a map in a project which needs coordinates to set markers

  • 0

So…i have used a map in a project which needs coordinates to set markers to different positions. There are many options available to me to get the coordinates.

  1. Store the coordinates in a database and use django view to get and forward the coordinates to the javascript function using an ajax response.

  2. Store it into a python list or dictionary and send the data when needed to that javascript func.

  3. Hard code the coordinates in a HTML tag attribute and get them via javascript and then set the marker.

  4. Use files and get data through file I/O in django view and forward that to the javascript function.

I want to know which of these techniques is efficient for about 50 set of coordinates and which one will be more sufficient if my set increases to about 1000?

If you have a better way to do this…please share it..
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:00:51+00:00Added an answer on June 9, 2026 at 3:00 am

    I think the best way would be to store this data in a database, for a couple of reasons:

    1. You will be able to perform some queries on this data, like “give me all points in the view port” or “give me all points that are 5km from some other point” – even if you don’t need it now it might be very useful in the future, especially if you think about having around 1000 points
    2. There are wonderful utils to keep coordinates in the database that integrate very well with Django – you should definitely check postgis and geodjango
    3. You are using Django, so you probably have some other data in the database and it’s nice to have everything in one place
    4. Unless it is some kind of static data that you’d like to display on the map that is not likely to change, it doesn’t feel right to keep it anywhere else than in the database.

    If for some reason you don’t want to use any database (even though you can always store this data in a file with sqlite) you can also try storing it in some python object and then send them to js (so the second option), and the third one I think is the worst – you are not able to make any operation with this data outside javascript, it would be very hard to read or debug (syntax errors for example).

    Hth

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
I have this xml <entry id=1008 section=articles> <excerpt><p>&#8230; in Richtung „Aus für Tierversuche. Kosmetik-Fertigprodukte
so I did $subject = 'sakdlfjsalfdjslfad <a href=something/8230>lol is that true?</a> lalalala'; $subject =
I have been making a wordpress template. i got stuck at some place... the
I have a form, one of the fields is a select field, with 5
I see that some rss on xml have strange strings. For example, ... is
I have a PDB file. Now it has two parts separated by TER. Before
Why does the Android system throw this Exception? 05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is
I would like to run a str_replace or preg_replace which looks for certain words
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.