My goal is the following:

I'm developing a Django project. The goal is to locate places with a form. I'm using a CreateView generic view (maybe I should create it manually for more customization.

3 optionally ways to locate :

  1. by hand
  2. HTML 5 geolocation API
  3. External GPS (that gives the position to HTML 5 geolocation API or directly in Django)

The first is working well.

For the last point. Would I like to know the best way and HOW?

  1. I read location from serial with pyserial and pynmea
  2. I send to a Linux or cross-platform bridge to give it HTML 5 Geolocation API (external to Django project)


  1. An activation button that switches from HTML 5 Geolocation API to external GPS. Latlong feeds then the leaflet-Django instance.

I know this relevant post for windows but I need make it working on Linux.

use the web geolocation from HTML 5 with the plugin leaflet.location.

Django 2.1 - GeoDJango - Django-leaflet GPS: BT-747 (serial GPS)

  • I'm not sure how you are planning to send serial data to a browser. Pyserial shouldn't be able to send data to HTML5 API. Dec 29, 2018 at 18:03

1 Answer 1


The GPSd can read serial GPS and feed Android geolocation API or HTML 5 geolocation API for Firefox.

firefox/mozilla, the Android smartphone operating system (from version 4.0 onwards and possibly earlier; we don't know for sure when the change happened) uses GPSD to monitor the phone's on-board GPS, so every location-aware Android app is indirectly a GPSD client.

  • I'm not sure if this is an answer, it appears to be a clarification of some part of the question
    – nmtoken
    Apr 23, 2019 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.