# Driving time polygons

**URL:** <https://community.thinkgeo.com/t/driving-time-polygons/4785>\
**Category:** WebForms\
**Created:** [April 28, 2009, 9:45am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785 "2009-04-28T09:45:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mainini](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/d6d6ee/32.png) [@mainini](https://community.thinkgeo.com/u/mainini)\
**Post date:** [April 28, 2009, 9:45am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785/1 "2009-04-28T09:45:21Z")

</div>

Hi,

I&nbsp;need&nbsp;to&nbsp;draw&nbsp;over&nbsp;Google&nbsp;map&nbsp;(or&nbsp;Yahoo,&nbsp;VE,&nbsp;...)&nbsp;polygons&nbsp;that&nbsp;represent&nbsp;the&nbsp;area&nbsp;reachable&nbsp;in&nbsp;a&nbsp;specific&nbsp;amount&nbsp;of&nbsp;time&nbsp;starting&nbsp;from&nbsp;a&nbsp;specific&nbsp;point.

For&nbsp;example,&nbsp;I&nbsp;choose&nbsp;the&nbsp;center&nbsp;of&nbsp;Milan&nbsp;in&nbsp;Italy,&nbsp;I&nbsp;specify&nbsp;a&nbsp;first&nbsp;driving&nbsp;time&nbsp;of&nbsp;10&nbsp;minutes&nbsp;and&nbsp;a&nbsp;second&nbsp;of&nbsp;20&nbsp;minutes,&nbsp;I&nbsp;select&nbsp;the&nbsp;mean&nbsp;of&nbsp;transport&nbsp;and&nbsp;as&nbsp;result&nbsp;I&nbsp;need&nbsp;to&nbsp;obtain&nbsp;2&nbsp;polygons&nbsp;to&nbsp;draw&nbsp;over&nbsp;the&nbsp;map&nbsp;with&nbsp;different&nbsp;colours.

Do&nbsp;you&nbsp;have&nbsp;any&nbsp;idea&nbsp;on&nbsp;how&nbsp;to&nbsp;do&nbsp;this&nbsp;with&nbsp;Map&nbsp;Suite&nbsp;Web&nbsp;3.0&nbsp;or&nbsp;using&nbsp;some&nbsp;plugin?

Thanks&nbsp;in&nbsp;advance

Fabio

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [April 29, 2009, 9:39am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785/2 "2009-04-29T09:39:15Z")

</div>

Fabio,&nbsp;  
  
  
  
So&nbsp;I&nbsp;think&nbsp;what&nbsp;you&nbsp;want&nbsp;is&nbsp;to&nbsp;add&nbsp;2&nbsp;polygons&nbsp;with&nbsp;different&nbsp;colors&nbsp;on&nbsp;Google&nbsp;Map,&nbsp;Here&nbsp;is&nbsp;what&nbsp;you&nbsp;need&nbsp;to&nbsp;do.&nbsp;  
  
1,&nbsp;You&nbsp;need&nbsp;2&nbsp;Overlays,&nbsp;one&nbsp;is&nbsp;for&nbsp;GoogleMap&nbsp;as&nbsp;the&nbsp;background,&nbsp;the&nbsp;other&nbsp;is&nbsp;a&nbsp;LayerOverlay&nbsp;which&nbsp;includes&nbsp;a&nbsp;InMemoryFeatureLayer&nbsp;with&nbsp;the&nbsp;2&nbsp;polygons.&nbsp;  
  
2,&nbsp;To&nbsp;display&nbsp;the&nbsp;LayerOverlay&nbsp;over&nbsp;GoogleMap,&nbsp;we&nbsp;need&nbsp;to&nbsp;set&nbsp;the&nbsp;Projection&nbsp;info&nbsp;for&nbsp;the&nbsp;InMemoryFeatureLayer,&nbsp;here&nbsp;is&nbsp;the&nbsp;codes&nbsp;how&nbsp;to&nbsp;do&nbsp;it.&nbsp;  
  
`Proj4Projection proj4 = new Proj4Projection(); // 4326 is the EPSG of the Decimal Degree proj4.InternalProjectionParametersString = Proj4Projection.GetEsriParametersString(4326); proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString(); layer.FeatureSource.Projection = proj4; `  
3,&nbsp;To&nbsp;render&nbsp;the&nbsp;2&nbsp;polygon&nbsp;differently,&nbsp;we&nbsp;need&nbsp;to&nbsp;set&nbsp;a&nbsp;codition&nbsp;column&nbsp;for&nbsp;the&nbsp;inMemoryFeatureLayer&nbsp;and&nbsp;use&nbsp;the&nbsp;ValueStyle&nbsp;to&nbsp;render&nbsp;it.&nbsp;  
  
`// Add the column to the layer layer.Columns.Add(new FeatureSourceColumn("Color")); // Add the corresponding value for the column for each feature feature.ColumnValues.Add("Color", "Red"); `  
  
  
Hope&nbsp;that&nbsp;helps.&nbsp;  
  
  
  
Thanks,&nbsp;  
  
  
  
Ben

---

<div class="post-metadata">

**Author:** ![mainini](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/d6d6ee/32.png) [@mainini](https://community.thinkgeo.com/u/mainini)\
**Post date:** [April 29, 2009, 11:20am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785/3 "2009-04-29T11:20:29Z")

</div>

Sorry,&nbsp;  
&nbsp;maybe&nbsp;my&nbsp;post&nbsp;is&nbsp;not&nbsp;clear.&nbsp;Starting&nbsp;from&nbsp;a&nbsp;specific&nbsp;point&nbsp;and&nbsp;giving&nbsp;a&nbsp;driving&nbsp;time&nbsp;specified&nbsp;by&nbsp;the&nbsp;user,&nbsp;I&nbsp;need&nbsp;to&nbsp;calculate&nbsp;and&nbsp;show&nbsp;all&nbsp;the&nbsp;locations&nbsp;reachable&nbsp;in&nbsp;this&nbsp;time.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Hope&nbsp;I&nbsp;clarify&nbsp;my&nbsp;need.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;  
&nbsp;Fabio&nbsp;

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [April 30, 2009, 12:34am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785/4 "2009-04-30T00:34:52Z")

</div>

Fabio,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Sorry&nbsp;for&nbsp;misunderstanding,&nbsp;but&nbsp;still&nbsp;I’m&nbsp;not&nbsp;very&nbsp;sure&nbsp;about&nbsp;your&nbsp;requirement.&nbsp;Let’s&nbsp;say&nbsp;I&nbsp;choose&nbsp;the&nbsp;center&nbsp;of&nbsp;Milan&nbsp;in&nbsp;Italy,&nbsp;and&nbsp;the&nbsp;user&nbsp;specify&nbsp;a&nbsp;driving&nbsp;time&nbsp;of&nbsp;10&nbsp;minutes,&nbsp;how&nbsp;can&nbsp;we&nbsp;get&nbsp;the&nbsp;reachable&nbsp;polygon&nbsp;in&nbsp;that&nbsp;10&nbsp;minutes?&nbsp;One&nbsp;simple&nbsp;way&nbsp;is&nbsp;to&nbsp;create&nbsp;a&nbsp;circle&nbsp;that&nbsp;takes&nbsp;Milan&nbsp;as&nbsp;the&nbsp;center&nbsp;and&nbsp;takes&nbsp;let’s&nbsp;say&nbsp;10&nbsp;miles&nbsp;as&nbsp;the&nbsp;radius,&nbsp;and&nbsp;display&nbsp;that&nbsp;circle&nbsp;on&nbsp;the&nbsp;map.&nbsp;That’s&nbsp;not&nbsp;an&nbsp;accurate&nbsp;reachable&nbsp;area&nbsp;though&nbsp;and&nbsp;as&nbsp;you&nbsp;mentioned&nbsp;Polygon,&nbsp;I&nbsp;thought&nbsp;you&nbsp;have&nbsp;your&nbsp;own&nbsp;better&nbsp;algorithm&nbsp;to&nbsp;get&nbsp;that&nbsp;area&nbsp;yourself.&nbsp;That’s&nbsp;why&nbsp;I&nbsp;focused&nbsp;on&nbsp;how&nbsp;to&nbsp;display/render&nbsp;a&nbsp;polygon&nbsp;on&nbsp;Google&nbsp;Map&nbsp;in&nbsp;my&nbsp;last&nbsp;reply.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;So&nbsp;still,&nbsp;could&nbsp;you&nbsp;let&nbsp;me&nbsp;know&nbsp;how&nbsp;to&nbsp;get&nbsp;the&nbsp;reachable&nbsp;polygon&nbsp;or&nbsp;just&nbsp;use&nbsp;a&nbsp;circle&nbsp;instead?&nbsp;&nbsp;You&nbsp;can&nbsp;try&nbsp;the&nbsp;codes&nbsp;in&nbsp;my&nbsp;last&nbsp;reply&nbsp;to&nbsp;draw&nbsp;a&nbsp;polygon/ellipse&nbsp;on&nbsp;the&nbsp;map.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;queries&nbsp;just&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Ben

---

<div class="post-metadata">

**Author:** ![mainini](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/d6d6ee/32.png) [@mainini](https://community.thinkgeo.com/u/mainini)\
**Post date:** [April 30, 2009, 11:08am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785/5 "2009-04-30T11:08:23Z")

</div>

Hi&nbsp;Ben,

the&nbsp;result&nbsp;I&nbsp;want&nbsp;to&nbsp;obtain&nbsp;is&nbsp;the&nbsp;one&nbsp;you&nbsp;can&nbsp;view&nbsp;in&nbsp;the&nbsp;attachment,&nbsp;circles&nbsp;are&nbsp;not&nbsp;the&nbsp;correct&nbsp;solution&nbsp;for&nbsp;me.

The&nbsp;problem&nbsp;is&nbsp;that&nbsp;I&nbsp;don't&nbsp;have&nbsp;the&nbsp;algorithm&nbsp;to&nbsp;calculate&nbsp;the&nbsp;area&nbsp;coverable&nbsp;in&nbsp;a&nbsp;specific&nbsp;amount&nbsp;of&nbsp;time,&nbsp;so&nbsp;I'm&nbsp;interested&nbsp;in&nbsp;suggestions&nbsp;or&nbsp;functionalities&nbsp;that&nbsp;MapSuite&nbsp;Web&nbsp;could&nbsp;provide&nbsp;to&nbsp;solve&nbsp;my&nbsp;trouble.

Thanks&nbsp;in&nbsp;advance

Fabio

[641-drivingtime.zip](https://community.thinkgeo.com/uploads/default/original/2X/e/e912949492eb7e91317d09b12dcc5240f0972fcd.zip) (90.7 KB)

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [May 4, 2009, 7:23am UTC](https://community.thinkgeo.com/t/driving-time-polygons/4785/6 "2009-05-04T07:23:08Z")

</div>

Fabio,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;see&nbsp;what&nbsp;you&nbsp;want,&nbsp;that’s&nbsp;an&nbsp;interesting&nbsp;idea.We&nbsp;don’t&nbsp;implement&nbsp;it&nbsp;now&nbsp;and&nbsp;I&nbsp;will&nbsp;add&nbsp;it&nbsp;to&nbsp;our&nbsp;traking&nbsp;system&nbsp;to&nbsp;see&nbsp;if&nbsp;we&nbsp;can&nbsp;do&nbsp;it&nbsp;in&nbsp;some&nbsp;future&nbsp;version.&nbsp;Thanks&nbsp;for&nbsp;pointing&nbsp;it&nbsp;out!&nbsp;  
&nbsp;&nbsp;  
&nbsp;Ben
