Giter Club home page Giter Club logo

maps's Introduction

page_type description languages products
sample
A list of open source projects related to Microsoft's geospatial and mapping services.
javascript
typescript
csharp
azure
azure-maps

Microsoft Open Source Map Projects

A list of open source projects related to Microsoft's geospatial and mapping services.

Product

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

maps's People

Contributors

eltociear avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mpetroff avatar msftgits avatar rbrundritt avatar vnbaaij avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maps's Issues

Position.fromLatLng returns a reversed Position object

Since you guys don't have a github repo for the javascript sdk I'm going to start filing issues in this samples project.

A Position object is nothing but a number array of [longitude, latitude]. The atlas.data.Position.fromLatLng() returns an array of [latitude, longitude].

A position on the map is represented [longitude, latitude] as given by this position in the eastern US.
image

I have a list of geocoordinates and I'll reverse geocode them, but first I'll make my life a little easier and convert them to a position object using Position.fromLatLng(). Problem is the returned Position object is backwards.

image

When I use this array in the reverseGeocode method I'll get a position in Antarctica instead of the US. It would be great if the fromLatLng method returned the correct Position object. Maybe just create a new one called fromLngLat().

Problem with reverse geocoding using D

As the code below shows, some of the addresses are not perfectly geocodes:

Create a dataframe that's tied to it's column names

df = spark.createDataFrame(((
(45.32202, -75.83875),
(47.62039, -122.34928),
(45.37032, -75.70161),
(45.3702793, -75.7037331),
(45.28471, -75.73897),
(48.85607, 2.29833)
)), StructType([StructField("lat", DoubleType()), StructField("lon", DoubleType())]))

Run the Azure Maps geocoder to enhance the data with location data

rev_geocoder = (ReverseAddressGeocoder()
.setSubscriptionKey(azureMapsKey)
.setLatitudeCol("lat")
.setLongitudeCol("lon")
.setOutputCol("output"))

Show the results of your text query in a table format

display(rev_geocoder.transform(FixedMiniBatchTransformer().setBatchSize(10).transform(df)).select(col("*"),
col("output.response.addresses").getItem(0).getField("address").getField("freeformAddress").alias("freeformAddress"),
col("output.response.addresses").getItem(0).getField("address").getField("country").alias("country")
).drop("output"))

The results are as below:

image

lat lon ReverseAddressGeocoder_da64c6411c23_error freeformAddress country
[45.32202] [-75.83875] ["25 Fitzgerald Road, Nepean ON K2H 1C3"] ["Canada"]
[47.62039] [-122.34928] ["400 Broad Street, Seattle, WA 98109"] ["United States"]
[45.37032] [-75.70161]
[45.3702793] [-75.7037331]
[45.28471] [-75.73897]
[48.85607] [2.29833] ["Place Jacques Rueff, 75007 Paris"] ["France"]

With Search Address API, requested query string is not the same with query string in response in Thai

Dear Team,

If this repo is inappropriate to discuss the Azure Maps REST API issue, please let me know or forward this to appropriate one.

  • Issue : With Search Address API, requested query string is not the same with query string in response in Thai

  • How to reproduce

Command line

curl -X POST "https://atlas.microsoft.com/search/address/batch/sync/json?api-version=1.0&subscription-key={the api key}" \
> -H "Content-Type: application/json" \
 > -d @data1.json

data1.json

{
    "batchItems": [
         **{"query": "?query=แหลมฉบัง,ศรีราชา,ชลบุรี&countrySet=TH&limit=1"}**
     ]
}

Response

{
   "batchItems":[
       {
          "statusCode":200,
          "response":{
             "summary":{
                **"query":"แหลมฉบ ง ศร ราชา ชลบ ร",**
                "queryType":"NON_NEAR",
                "queryTime":59,
                "numResults":1,
                "offset":0,
                "totalResults":109,
                "fuzzyLevel":1
             },
             "results":[
                {
                   "type":"Street",
                   "id":"TH/STR/p0/424342",
                   "score":12.2450714111,
                   "address":{
                      "streetName":"ซอยหมู่บ้านเซนสิริ โฮม แหลมฉบัง",
                      "municipalitySubdivision":"ทุ่งสุขลา",
                      "municipality":"ศรีราชา",
                      "countrySecondarySubdivision":"อำเภอ ศรีราชา",
                      "countrySubdivision":"จังหวัด ชลบุรี",
                      "postalCode":"20230",
                      "countryCode":"TH",
                      "country":"ประเทศไทย",
                      "countryCodeISO3":"THA",
                      "freeformAddress":"ซอยหมู่บ้านเซนสิริ โฮม แหลมฉบัง Alley/Road , ทุ่งสุขลา Sub District, อำเภอ ศรีราชา District, จังหวัด ชลบุรี 20230",
                      "localName":"อำเภอ ศรีราชา"
                   },
                   "position":{
                      "lat":13.11886,
                      "lon":100.93152
                   },
                   "viewport":{
                      "topLeftPoint":{
                         "lat":13.12005,
                         "lon":100.92924
                      },
                      "btmRightPoint":{
                         "lat":13.11779,
                         "lon":100.93267
                      }
                   }
                }
             ]
          }
       }
    ],
    "summary":{
       "successfulRequests":1,
       "totalRequests":1
    }
 }

LANG is 'en_US.utf8' on my Azure Cloud Shell. I tried lang=th-TH in query string but no difference in response.

In request query string is "แหลมฉบัง,ศรีราชา,ชลบุรี" as address, but it's not the same in response, batchItems-response-summary-query "แหลมฉบ ง ศร ราชา ชลบ ร"

By tracing with curl (curl --trace), the response part looks like this
image

Converting the hex string in the red box, it is "แหลมฉบ ง ศร ราชา ชลบ ร"
image

I guess this issue's from the payload of the API not curl or my testing environment. Please let me know if there's anything that I missed

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.