Showing drone position on a map on a webpage

Lets say i wanted to show my drone position on a google map, the drone and or the ground station have internet connection. How could i feed the webpage with actual position?
I know it is probably complicate but if anybody has some hints than i can try to investigate forward and work my way.

You need a background process on your webserver which connects to the ground station (Mission Planner can relay Mavlink packets via TCP or UDP) and displays the drone position on the page. Or a javascript, or whatever web programing environment you prefer.

Ok thanks, i was thinking more about having a process on the drone itself, since it has 4G connectivity.

If you have 4G then I assume you have some computer onboard, then a small process on that computer can push the position updates to the remote server as well. And a MavProxy can provide data for that process.

Yes i have a raspberry on board and a small 4G router.

I was wondering if i can have a listener using dronekit maybe on gps position and than push it to the webserver. Didn’t look much into listeners but maybe are the right tool.

Perhaps look at https://www.andruav.com/

Andruav is interesting but we already have all the 4G system running on our vpn server and we added some on board securities.
I just implemented a server that streams the video on a web page from onboard and i would like to add a map next to the video to show position.

Yes, something like this (It just an excerpt from dronekit api docs, i’m not well versed in python and dronekit)

>  from dronekit import connect
> 
>   # Connect to the Vehicle using "connection string" (in this case an address on network)
> vehicle = connect('127.0.0.1:14550', wait_ready=True)
> 
> #Callback to print the location in global frame
> def location_callback(self, attr_name, msg):
>     print "Location (Global): ", msg
> 
> #Add observer for the vehicle's current location
> vehicle.add_attribute_listener('global_frame', location_callback)

I guess i need to take a closer look at it, i am not really good at coding since my job is the net infrastructure not the code itself but i want to give it a shot. Thank you very much for the hint.