3

I want to implement a code in android to show area covered by a PINCODE that is six digit area code on google map as shown in the screenshot attached.enter image description here

Kindly provide a way how can I accomplish this thing.Thanks in advance.

xomena
  • 31,125
  • 6
  • 88
  • 117
Jigar Pandya
  • 2,129
  • 2
  • 17
  • 27

2 Answers2

0

You can try the Google Maps Geocoding service to locate the area or region that you type in your maps. Geocoding is the process of converting addresses into geographic coordinates, which you can use to place markers or position the map.

Geocoding has a required parameter address that you need to supply in order for it to locate/geocode the address that you type. And this address supports the postal_code that you want to search.

Although this code is in JavaScript, here is the link for the example code and how to use Geocoding.

For the area part that you want to return when searching postal_code, I think you can use Polygons.

A polygon represents an area enclosed by a closed path (or loop), which is defined by a series of coordinates. Polygon objects are similar to Polyline objects in that they consist of a series of coordinates in an ordered sequence. Polygons are drawn with a stroke and a fill. You can define custom colors, weights, and opacities for the edge of the polygon (the stroke) and custom colors and opacities for the enclosed area (the fill).

For more information about Polygons, Check this example and the above link for documentation.

Also check this sets of link that may give you an idea.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31
0

Currently Google Maps APIs do not expose the boundaries of postal codes areas.

There is corresponding feature request in public issue tracker:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=4008

However, it looks like Google didn't set a priority on this task.

UPDATE

As @kaskader mentioned I posted a link for Maps JavaScript API feature request. Sorry for confusion.

Please have a look at another answer where you can find a workaround for your question.

https://stackoverflow.com/a/43918793/5140781

Community
  • 1
  • 1
xomena
  • 31,125
  • 6
  • 88
  • 117