Django ElasticSearch Ionic Building GIS Mobile applications-Architecture design

Source: Internet
Author: User
Tags solr

Search engine is a good thing, GIS is also a good thing. There are currently Django and Ionic. At last

Architecture Design

After a brief consideration of our needs, we have designed some of the following simple architectures.

Description of GIS architecture--service side

Brief description:

    • Users create data in the foreground or in the background.
    • When the model saves data, it calls Google's API to resolve the GPS
    • Set up real-time updates in Haystack configuration and update indexes automatically when data is created
    • Data is elasticsearch indexed

Here are some simple introductions to the framework


Django is an open-source Web application framework written by Python. The MVC Software Design pattern is used, i.e. model M, view V and Controller C. It was originally developed to manage some of the news content-based websites of the Lawrence Publishing Group. and was released in July 2005 under the BSD license. The framework is named after the Belgian gypsy jazz guitarist Django Reinhardt.

The main goal of Django is to make it easy to develop complex, database-driven Web sites. Django focuses on component reusability and "pluggable", agile development and dry rules (Don ' t Repeat yourself). Python is commonly used in Django, and even includes configuration files and data models.

The reason for the first consideration of Django, rather than other node or Ruby frameworks, is:

    • Built-in authentication system
    • Built-in CSRF

This, of course, is also owned by other frameworks, and the main features are:

    • A form serialization and validation system for converting between HTML forms and data that is suitable for database storage.
    • A set of infrastructure to assist in the creation of geographic information systems (GIS)

The last one is the highlight, built-in GIS, although not how to use, but at least in the deployment is more convenient.


Haystack provides modular search for Django. It features a unified, familiar API that allows your to plug in different search backends (such as SOLR, Elasticsearch, who OSH, Xapian, etc.) Without has to modify your code.

Haystack is a search module for Django BlaBla: His main feature is the ability to

Write your search code once and choose the search engine you want it to run on

That means you just have to write your code and choose your search engine to work.


In the above haystack offers these a bunch of search engines, of course support location search only Solr and ElasticSearch , they support space search has:

    • Within
    • Dwithin
    • Distance
    • Order_by (' distance ')
    • Polygon

There is no polygon search on the document written in SOLR, but it is actually supported (see this article: Google Map SOLR polygon search.

As for why the use of Elasticsearch, is because before with SOLR did ...

GIS Schema Description--Client Simple description--get
    1. When we visit the map view, we call HTML5 to get the user's location.
    2. Set the zoom based on the user's location positioning
    3. Make a Elasticsearch request based on the user's location and return the result with a distance
    4. Show
Brief description--post
    1. The user fills in the data and sends it to the Django API and verifies
    2. When successful, the database is saved and the index is updated.

Ionic provides a free and open source Mobile optimization html,css and JS component library to build highly interactive applications. Based on sass construction and ANGULARJS optimization.

The main use of Angularjs, before using him to write three apps.

Django REST Framework

Compared to Django Tastypie, the main advantage of DRF is the debugging of the Web interface.


Because the selection is more familiar with the technology stack, so it only took less than two days of spare time to complete. Perhaps this is the advantage of a full stack programmer.

Service-side code: Https://

Client code: Https://

Django ElasticSearch Ionic Building GIS Mobile applications-Architecture design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.