# Julia and GoogleMaps

**URL:** <https://discourse.julialang.org/t/julia-and-googlemaps/29693>\
**Category:** General Usage\
**Created:** [October 9, 2019, 7:35pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693 "2019-10-09T19:35:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dervis](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dervis](https://discourse.julialang.org/u/Dervis)\
**Post date:** [October 9, 2019, 7:35pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/1 "2019-10-09T19:35:28Z")

</div>

Dear all,

I 'd like to plot my GPS points (LLA) on Googlemaps with Julia and also would like to plot a route between two GPS points on GoogleMaps again via julia. I did a little bit of research on the forums but couldn’t really find a clear answer for this nor an example of Julia and GoogleMaps interact. Anyone knows a way or example to do?

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [October 9, 2019, 7:45pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/2 "2019-10-09T19:45:33Z")

</div>

Googlemaps or GoogleEarth?

---

<div class="post-metadata">

**Author:** ![Dervis](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dervis](https://discourse.julialang.org/u/Dervis)\
**Post date:** [October 9, 2019, 9:07pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/3 "2019-10-09T21:07:47Z")

</div>

Googlemaps, since I will try to find quickest path using real-time traffic data between the two GPS points.

Thank you

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [October 9, 2019, 10:24pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/4 "2019-10-09T22:24:44Z")

</div>

To GE one give it .kml/.kmz, what data do you supply to googlemaps?

---

<div class="post-metadata">

**Author:** ![Dervis](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dervis](https://discourse.julialang.org/u/Dervis)\
**Post date:** [October 10, 2019, 2:22am UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/5 "2019-10-10T02:22:07Z")

</div>

All of my data is in .csv files as longitude, latitude, altitude, date and time.

---

<div class="post-metadata">

**Author:** ![IlyaOrson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ilyaorson/32/1681_2.png) [@IlyaOrson](https://discourse.julialang.org/u/IlyaOrson)\
**Post date:** [October 10, 2019, 2:34am UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/6 "2019-10-10T02:34:31Z")

</div>

Forio had a related [demo](https://forio.com/about/blog/route-optimizer-julia-google-maps-epicenter/) with [code](https://github.com/forio/route-optimizer) that used to work not so long ago, it might be a useful place to start.

---

<div class="post-metadata">

**Author:** ![Dervis](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dervis](https://discourse.julialang.org/u/Dervis)\
**Post date:** [October 11, 2019, 5:29pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/7 "2019-10-11T17:29:49Z")

</div>

Thank you very much for your response Ilya,

I checked them before I posted this topic here, but the code is more for modeling, and doeesn’t give us an idea of how Julia and GoogleMaps are interacting with

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [October 12, 2019, 3:45pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/8 "2019-10-12T15:45:38Z")

</div>

But again, without Julia, how do you send in you data to GoogleMaps? Is there any equivalent to the kml/kmz for GE?

---

<div class="post-metadata">

**Author:** ![Dervis](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dervis](https://discourse.julialang.org/u/Dervis)\
**Post date:** [October 20, 2019, 11:20pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/9 "2019-10-20T23:20:25Z")

</div>

I dont know how GoogleMaps is accepting data, but all I have is a CSV file that includes date-time-longitude-latitude-altitude data. I can change the file format to any file that is convenient for GoogleMaps, but before that, I need to know a way to plot GoogleMaps in Julia

Thank you

---

<div class="post-metadata">

**Author:** ![scelles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scelles/32/220408_2.png) [@scelles](https://discourse.julialang.org/u/scelles)\
**Post date:** [November 5, 2019, 9:06pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/10 "2019-11-05T21:06:34Z")

</div>

Not sure how/if you can interact with Google Maps using Julia as Google Map API is, I think, only available in JavaScript.

But I’d be also interested by such a project…

An other approach could be to create a KML file ie an XML file (or a KMZ file an XML compressed file) and open such file using Google Earth.

I own a Bluetooth GPS logger (XGPS160) which directly output such KML file.

Here is an example

```julia

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
	<ExtendedData>
		<Data name="GPSModelName">
			<value>Dual XGPS160</value>
		</Data>
	</ExtendedData>
	<Placemark>
		<gx:Track>
			<altitudeMode>absolute</altitudeMode>
				<when>2019-11-05T17:38:28Z</when><gx:coord>1.299213 44.399460 95.4</gx:coord>
				<when>2019-11-05T17:38:32Z</when><gx:coord>1.299214 44.399464 95.5</gx:coord>

...

		</gx:Track>
	</Placemark>
</kml>

```

My opinion is that there is a room for a developer (or several developers) to be able to create such files in a quite human understandable API (probably on top of libraries such as [LightXML.jl](https://github.com/JuliaIO/LightXML.jl) or [EzXML.jl](https://github.com/bicycle1885/EzXML.jl)

Such a project could be quite similar to Python libraries such as [pyKML](https://pythonhosted.org/pykml/) (seems to be unmaintained), [fastkml](https://github.com/cleder/fastkml), [simplekml](https://simplekml.readthedocs.io/)

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [November 5, 2019, 9:32pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/11 "2019-11-05T21:32:20Z")

</div>

[GMT.jl](https://github.com/GenericMappingTools/GMT.jl) can produce kml. I haven’t tested it much for that purpose but since [GMT](https://www.generic-mapping-tools.org/) can so must [GMT.jl](https://github.com/GenericMappingTools/GMT.jl)

---

<div class="post-metadata">

**Author:** ![scelles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scelles/32/220408_2.png) [@scelles](https://discourse.julialang.org/u/scelles)\
**Post date:** [November 6, 2019, 4:47pm UTC](https://discourse.julialang.org/t/julia-and-googlemaps/29693/12 "2019-11-06T16:47:22Z")

</div>

Integration of Julia with tools such as [Cesium](https://cesium.com/) / [CesiumJS](https://cesium.com/cesiumjs/) may be also interesting.
