Skip to content

Show google map with google static map api and Direction API. It does not require specific API Key.

Notifications You must be signed in to change notification settings

JHPrk/gmapDirectionDrawIntoImg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisite

Google Static Map API & Direction API are needed
python packages :

  • urllib
  • PIL

Features

findDirectionOfNowToDestination(self, origin, dest, mode = "transit", departure_time = "now")

  • using Direction API to find direction of origin to destination Format : (Longitude,Latitude)
  • return : json response from direction api

jsonPathParsing(self, jsonPath)

  • using parser to parsing json response into needed format
  • return : path string format

drawImageWithJsonPath(self, stepList, center, zoom = 17, maptype = "roadmap", size = "600x300", color = "0x0000ff", weight = 3)

  • draw and save image into local drive
  • return : image binary data

Error occurs when no path is available

Result

A. Dongguk university to Seoul Station Using encoded polylines
ResultImage enc
B. Dongguk university to Seoul Station Using longitude latitude steps
ResultImage_lonlat
C. It is not accurate in case of zooming too much.. TODO
ResultImage 1

Todo :

  1. draw map with heading. -> Similar to navigation mode
  2. draw road map poly lanes fit into actual road

About

Show google map with google static map api and Direction API. It does not require specific API Key.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages