Reverse GeoCoding of a Polygon RRS feed

  • Question

  • Please assist I want to do a reverse GeoCoding of polygons on a map(Bing or Google).

    Let's say for example have a list of coordinates for several polygons, so what i want to do is to load those polygons to a map then find all locations or markers inside every polygon and return the address if there is any.

    I got some pointers on how I can load the polygon using the following example:

    <!DOCTYPE html>
        <meta charset="utf-8" />
    <script type='text/javascript'>
        function GetMap() {
            var map = new Microsoft.Maps.Map('#myMap', {});

            var center = map.getCenter();

            //Create array of locations to form a ring.
            var exteriorRing = [
                new Microsoft.Maps.Location(center.latitude - 0.5, center.longitude - 1),
                new Microsoft.Maps.Location(center.latitude - 0.5, center.longitude + 1),

            //Create a polygon
            var polygon = new Microsoft.Maps.Polygon(exteriorRing, {
                fillColor: 'rgba(0, 255, 0, 0.5)',
                strokeColor: 'red',
                strokeThickness: 2

            //Add the polygon to map
        <script type='text/javascript' src='[YOUR_BING_MAPS_KEY]' async defer></script>
        <div id="myMap" style=";width:600px;height:400px;"></div>

    But now I want to be able to get a list of all markers inside the polygon and save them somewhere(database, file..)

    Please help

    Thursday, September 19, 2019 8:25 AM

All replies