0

Before you read anything else:

I'm aware that a derivative (integral, maybe?) of this question has been asked before (see here and here), but this question asks a little bit more than either of those. In addition, the two of those are a bit out of date.

The Important Stuff

So here's the question(s):

  • Is there a reliable Google Maps .NET wrapper that supports polygons and spatial searches (the containsLocation() method)?

  • If there isn't, can anybody point me in the right direction to get started writing my own? Specifically the polygon/searching stuff.

Additional Reading

There are a couple of reasons I want to do this. First off, I'm developing a mobile site, and I don't want to overload the client with a bunch of javascript. Second -- I don't actually need to display the map at all. All I really need to do is plot the polygons on the map and search for lat/long coordinates inside the shapes.

Community
  • 1
  • 1
Phillip Schmidt
  • 8,805
  • 3
  • 43
  • 67
  • I think this would violate the terms of use for google maps... – eFloh Dec 20 '12 at 16:49
  • @eFloh how would it violate the terms of use for google maps, exactly? You're aware that to do this, you'd still have to make requests to the maps server, right? You'd just be doing it from a server. – Phillip Schmidt Dec 20 '12 at 16:51
  • I would have say that it is very possible that this violates so be careful going forward.https://developers.google.com/maps/terms – Jamie Dec 20 '12 at 17:07

2 Answers2

1

Here is one that I found: https://gmaps.codeplex.com/ It does not look like it has been touched in some time but should help you get started.

Jamie
  • 3,094
  • 1
  • 18
  • 28
0

For Place Search (Places API), Google Maps API supports proximity search by specifying circular / rectangular range for a location bias parameter. Note that it is not supporting generic polygons and spatial searches as OP asked.

locationbias — Prefer results in a specified area, by specifying either a radius plus lat/lng, or two lat/lng pairs representing the points of a rectangle. If this parameter is not specified, the API uses IP address biasing by default.

https://developers.google.com/places/web-service/search

Places are defined within this API as establishments, geographic locations, or prominent points of interest.

The Places API lets you search for place information using a variety of categories, including establishments, prominent points of interest, and geographic locations. You can search for places either by proximity or a text string. A Place Search returns a list of places along with summary information about each place; additional information is available via a Place Details query.


.NET wrapper libraries for the Google Maps API (including Places API):

  1. GoogleApi
  2. google-maps

https://stackoverflow.com/a/61531795

Alex P.
  • 1,140
  • 13
  • 27