Given a location specified as latitude/longitude, I want to know how to obtain a polygon feature that represents 15 minutes' travelling time from the original point location, using the Google Maps API.

  • I think this may actually be a duplicate of gis.stackexchange.com/questions/46/… but while that question is targetted at Google Maps, all the answers treat it like a software recommendation question, and it's (IMO, wrongly) closed as too-broad. – alphabetasoup Dec 6 '18 at 10:00

The key term you need to search for this is "isochrone", meaning a line/area representing space where something arrives or occurs in equal time. You can find related questions: .

Producing isochrones of driving time with the Google Maps API is technically possible. There are several attempts:

The second link includes an example of using their interface:

    lat: 48.860901,
    lng: 2.307405,
    type: 'duration',
    value: 10 * 60,
    mode: 'walking',
    callback: myCallback

It's worth noting that this is not computing true isochrones. Rather it is using the distance matrix to sample travel times across an area, and then estimate a round-ish shape that approximates an isochrone. Google does not currently support direct computation of isochrones with their API.

There are other services that return better isochrones, such as Mapbox's isochrone API. Many such substitutes are listed as answers to this question: Can you make a travel region polygon with with Google Maps API?

  • If you provide additional details regarding the isochrones and my question it will be helpful and can we use isochrones in javascript or node.js – Ratan Uday Kumar Dec 6 '18 at 10:54
  • @RatanUdayKumar Maybe you could add more details in your question? How is your application currently put together? Is this for the browser, or a server? Have you read the readmes of those Github repositories? – alphabetasoup Dec 6 '18 at 20:54
  • IT is server side application for nodejs and javascript – Ratan Uday Kumar Dec 7 '18 at 7:53
  • Mapbox IsoChrone API seems pretty good - docs.mapbox.com/help/tutorials/get-started-isochrone-api/… – prayagupd Apr 21 '20 at 15:05

Although I see I am late to the party, I would share my thoughts with you on creating proper isochrones. If you are familiar with PostgreSQL, PosGIS, pgRouting and OSM you could create a nice tool that creates isochrones.

Given PostgreSQL and its extensions, PostGIS and pgRouting are installed on your server you'll first need to import a road network for your area of interest that you can get from OSM.

You will then utilize the routing algorithm of your preference in pgRouting.

A sample query (that I grabbed from a presentation PDF) is below:

SELECT 1 As id, ST_SetSRID(pgr_pointsAsPolygon(     $$SELECT dd.seq ASid, ST_X(v.the_geom) AS x, ST_Y(v.the_geom) As y FROM pgr_drivingDistance($sub$SELECT gid Asid, source, target,             cost_s AScost, reverse_cost_s AS reverse_cost FROM ospr.ways$sub$,        (SELECTn.idFROM ospr.ways_vertices_pgr ASnORDERBY ST_SetSRID(                ST_Point(­76.933399,38.890703),4326) <­> n.the_geom LIMIT1)         ,  5*60, true      ) AS dd INNERJOIN ospr.ways_vertices_pgr AS v ON dd.node = v.id$$   ), 4326) As geom;

If this is something that you are interested in, you can find more details around page 11 of this PDF Ten problems solved by PostGIS


I would recommend to use the reachability data from Openrouteservices.org and put them into GoogleMyMaps interactive map builder.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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