Creating delivery zones...

835 views
Skip to first unread message

Michael Falk

unread,
Sep 16, 2011, 4:40:36 PM9/16/11
to google-map...@googlegroups.com
I have a situation where my customers base gravel delivery costs on which "zone" they are delivering to. For instance, they may set up "Zone 1" which covers a particular part of the city which is a 10 square block area and that "Zone" is $5.00 per tonne of gravel delivered.  "Zone 2" may be farther away and covers a different set of city blocks and is $5.50 per tonne delivered.  Is it possible to create a layer that would know all these zones and when the end user inputs an address, the Google map would know which zone it falls into and throw back a dollar value or whatever... a reference number... it does not matter really, as long as it can tell the quoting system which zone it falls into so it can calculate the delivery costs? 

Also, if this is possible, is it possible to give that functionality to the end user so they can set up their own zones?

I am VERY new to the Google Maps API and from what I can tell, KML might be the method to do this...???

Thanks...

Michael

John Coryat

unread,
Sep 16, 2011, 5:17:29 PM9/16/11
to google-map...@googlegroups.com
You could have your user setup polygons using the "My Maps" feature of the Google maps, then use those KML specs to overlay polygons on your map. You can also use those polygons to detect what zone the user has clicked and based on that, do the computation on cost to zone.

That would be the easiest. If your client wants a huge number of zones, then this method isn't practical but if it's just one city then this should work well and also be flexible. If the zones change, then your client simply alters the zone definitions with the "My Maps" function again.

-John Coryat

John Coryat

unread,
Sep 16, 2011, 5:18:53 PM9/16/11
to google-map...@googlegroups.com
>> You could have your user setup polygons using the "My Maps" feature of the Google maps, then use those KML specs to overlay polygons on your map. You can also use those polygons to detect what zone the user has clicked and based on that, do the computation on cost to zone.

I meant:

You could have your client setup polygons using the "My Maps" feature of the Google maps, then use those KML specs to overlay polygons on your map. You can also use those polygons to detect what zone the user has clicked and based on that, do the computation on cost to zone.

-John Coryat

geoco...@gmail.com

unread,
Sep 16, 2011, 6:15:18 PM9/16/11
to Google Maps JavaScript API v3
On Sep 16, 2:18 pm, John Coryat <cor...@gmail.com> wrote:
> >> You could have your user setup polygons using the "My Maps" feature of
>
> the Google maps, then use those KML specs to overlay polygons on your map.
> You can also use those polygons to detect what zone the user has clicked and
> based on that, do the computation on cost to zone.
>
> I meant:
>
> You could have your *client *setup polygons using the "My Maps" feature of
> the Google maps, then use those KML specs to overlay polygons on your map.
> You can also use those polygons to detect what zone the *user* has clicked
> and based on that, do the computation on cost to zone.

Example using kml polygons:
http://www.geocodezip.com/geoxml3_test/v3_collection-map2e.html

-- Larry

>
> -John Coryat

John Coryat

unread,
Sep 17, 2011, 2:05:52 PM9/17/11
to google-map...@googlegroups.com
Larry,

Great example.

-John Coryat
Reply all
Reply to author
Forward
0 new messages