Why doesn't Geolocation return exact address - html

Could anyone explain to me why when I allow HTML5 Geolocation Demos to use my location it always returns New York, however, when I go on my phone it shows my exact position? I am trying to implement a 'current location' function on my website, though I don't know if it is possible.
Thank you

Your phone has a GPS radio that can narrow your location down to within ten or so meters. Your computer (generally) has no such capability. Your browser can use information like your IP address to get close to your actual location, but it can't achieve anything like your phone's precision.

There are a number of pieces of additional information available to your phone that can be used to determine your location more accurately than on a typical wired desktop. Notably:
A GPS receiver
Wi-Fi access points (APs) visible to your phone and the signal strength of each
Cell towers visible to your phone and the signal strength of each
GPS
Generally speaking, GPS when available is likely to give the highest accuracy. With a clear view of the sky, most phones can geolocate you using GPS to within 5 meters or less.
Wi-Fi
Companies like Google/Apple have information matching known AP SSIDs/MAC addresses to geographic locations. A phone is able to send information off to a service (such as Google's geolocation API) about the APs it can see and their signal strength. The service returns an estimate of location based on what it knows about those APs and any proprietary algorithms the service provider uses to determine location based on AP signal strengths.
Cell towers
Much like Wi-Fi information, your phone can send off cell tower visibility/signal strength information to a service which can estimate location based on what it knows about the cell towers under consideration.
Here's an example of what a phone might send off to Google's geolocation service (copied verbatim from the link):
{
"version": "1.1.0",
"host": "maps.google.com",
"home_mobile_country_code": 310,
"home_mobile_network_code": 410,
"radio_type": "gsm",
"carrier": "Vodafone",
"request_address": true,
"address_language": "en_GB",
"location": {
"latitude": 51.0,
"longitude": -0.1
},
"cell_towers": [
{
"cell_id": "42",
"location_area_code": 415,
"mobile_country_code": 310,
"mobile_network_code": 410,
"age": 0,
"signal_strength": -60,
"timing_advance": 5555
},
{
"cell_id": "88",
"location_area_code": 415,
"mobile_country_code": 310,
"mobile_network_code": 580,
"age": 0,
"signal_strength": -70,
"timing_advance": 7777
}
],
"wifi_towers": [
{
"mac_address": "01-23-45-67-89-ab",
"signal_strength": 8,
"age": 0
},
{
"mac_address": "01-23-45-67-89-ac",
"signal_strength": 4,
"age": 0
}
]
}
Note that some of the information in the example is even more detailed than what I've described. But you probably get the idea about the kind of hints regarding location that a typical modern phone provides that a desktop machine can't.
From my personal experience, Wi-Fi/Cell tower based geolocation is not as accurate as GPS, but can be quite good. For example on a base model iPad without a GPS chip, I can often get accuracy within 50 meters based off Wi-Fi/cell towers alone. In more densely populated Wi-Fi areas (e.g. in the city) I imagine the accuracy is even better and will continue to get better over time.

Related

How to differentiate Revit Models in BIM360 that are live versus copies

We do a lot of scanning of BIM360 projects using Forge Data Management - our goal, in many cases, is to identify files that can be opened "live" in Revit via BIM Collaborate Pro (or now with Design Automation).
We have historically looked for the presence of ModelGuid and ProjectGuid within the version/attribute data - but we've started to run into more and more scenarios where "Copies" of this published model (such as Shared, Consumed, or for Model Coordination) ALSO have the ModelGuid and ProjectGuid - but you can't open those files "live" (or if you do, you're opening "something else").
So my question boils down to - with Forge:
Can you identify whether a ForgeDM item corresponds to a live model (and is not a copy).
In the absence of that, could you at least be able to identify Shared, Consumed or Model Coordination folders (so that you could KNOW that those are copies).
"data": {
"modelVersion": 30,
"isCompositeDesign": true,
"mimeType": "application/vnd.autodesk.r360",
"compositeParentFile": "Medical Office Architect.rvt",
"projectGuid": "f1451983-e2f5-47df-970e-05e63dded686",
"originalItemUrn": "urn:adsk.wipprod:dm.lineage:UaVTyWQxRyGezYpTePIYMw",
"modelType": "multiuser",
"latestEpisodeGuid": "cf78ab51-5a9f-45f6-8e8a-412fb9119090",
"modelGuid": "3d348036-c6f8-4686-849b-8aac6f94e545",
"processState": "PROCESSING_COMPLETE",
"extractionState": "SUCCESS",
"splittingState": "NOT_SPLIT",
"reviewState": "NOT_IN_REVIEW",
"revisionDisplayLabel": "13",
"sourceFileName": "Medical Office Architect.rvt",
"conformingStatus": "NONE"
}

The remote server returned an error: (400) Bad Request. Using Shopify API to post product with body_html

I am using Shopify API to post a product at Shopify. When I add a lengthy Detail in body_html of my http_request (Which is taking data in JSON format). I want to give complete detail with special characters in it Please give me any solution.
My code is this
{"product":{"title":"Premium LCD Digital Multimeter","body_html":"Premium LCD Digital Multimeter
New Digital Multimeter is an electronic measuring instrument that combines all your most commonly used measurement functions into one unit. This Multimeter comes with measurement and testing functions for voltage, current, resistance, continuity (the connection between two points), testing diodes, and temperature
This Digital Multimeter is a must have testing tool for your toolbox, shed, garage, car trunk, etc. Its portability enables you to be able to take it with you wherever you go and provides you with a multitude of features that helps you achieve the best results every time
Features:
* LCD Display
* Auto power off
* Digital Multimeter
* Handheld Multimeter
* Great tool bag accessory
* Great hardware hacking and reverse engineering
* Portable and versatile, easy to carry around and fits neatly in your tool bag
* Multiple testing functions, diode testing, AC/DC testing, temperature, continuity
* Perfect for home DIY en","product_type":"","vendor":"Abdur Rehman","tags":"blue,green,red","options":[],"images":[
{
"src": "https://business.tradingzon.com/images/itemimages/15Json Turneryg1 (261).jpg"
},
{
"src": "https://business.tradingzon.com/images/itemimages/15Json Turneryg2 (159).jpg"
},
{
"src": "https://business.tradingzon.com/images/itemimages/15Json Turneryg3 (143).jpg"
}
],"variants":[
{
"title": "Default Title",
"barcode": "dsfsr4353",
"inventory_quantity": 1,
"option1": "Default Title",
"price": 10.69,
"weight": 0.4,
"weight_unit": "kg",
"sku": "JSN-YG-02-090",
"grams": 400,
"tracked": "true",
"compare_at_price": 15.45,
"inventory_policy": "continue"
}
]}}
Simple. Your description field is not in proper JSON format. There are no newlines and you'll have to use "\n" syntax to tell JSON processor that it's a newline. A useful tool - https://jsonlint.com/

Google Maps API distance matrix over sea

I am using the google maps api in a test version to calculate the travel distance between two or more adresses. Now, usually, this is not a problem at all, considering that the distance matrix does exactly that. But when I try to get the distance between two points, let's say Berlin and New York, seperated by sea, I run into problems, the API returns zero_results. I assume this is because the travel mode is "driving" as by default, yet I can not find a more fitting mode in the documentation. https://developers.google.com/maps/documentation/distance-matrix/intro#travel_modes.
Am I using the wrong product? Is there a travel mode I missed? Hope somebody can help me with this, thanks.
The API call I use is
https://maps.googleapis.com/maps/api/distancematrix/json?origins=Berlin&destinations=New+York&key=MY_KEY
The response I get is
{
"destination_addresses" : [ "New York City, New York, USA" ],
"origin_addresses" : [ "Berlin, Deutschland" ],
"rows" : [
{
"elements" : [
{
"status" : "ZERO_RESULTS"
}
]
}
],
"status" : "OK"
}
The currently supported Travel modes are driving, walking, bicycling and transit. So you would probably choose the transit mode as you obviously can't drive, walk or bicycle from Berlin to NY.
For the transit mode, the supported transit_mode values are bus, subway, train, tram and rail. So again, nothing here that allows for crossing the ocean...
I would assume that these are the only possible travel modes you can get today via the API.

Google reverse geocoder doesn't return unincorporated community names

So, there is an "Anthony" small community which showed in GoogleMaps
https://www.google.com/maps/place/Anthony,+WV+24938,+USA/#37.8959703,-80.3407936,15z/data=!3m1!4b1!4m2!3m1!1s0x884c425d36b87e11:0xd99c2e98a2185333?hl=en
My question is - why Google's reverse geocoder doesn't return correct name of that unincorporated community?
For example, if i try to reverse that coordinates 37.895767,-80.330698 which points to the center of "Anthony" it returns "Frankford"-city, which far far away from "Anthony"(see picture).
Similar behavior at maps.google.com - when i point near "Anthony" it shows nothing related to it. See another picture.
Hereis JSON returned from reverse geocoder(json format). And there is no any signs about "Anthony" location. I'm curious...why?
Any thoughts?
P.S. I'm using web-api to obtain reversed geocoded data
https://maps.googleapis.com/maps/api/geocode/json?latlng=37.895767,-80.330698&language=en&key=MY_KEY
This may have something to do with rural naming conventions, given that these places belong to "unincorporated" (region of land that is not governed by its own local municipal corporation, but rather is administered as part of larger administrative divisions) criteria. In your JSON data: "formatted_address": "3853 Anthony Rd, Frankford, WV 24938, USA", notice the the type property which is based on locality and political:
{
"long_name": "Frankford",
"short_name": "Frankford",
"types": [
"locality",
"political"
]
}
This means that Frankford is the recognized locality of Anthony area. There is also a chance that Google Maps are that inaccurate ( it was able to pinpoint the location though) as implied by spherical geometry concepts in Google Docs.
Looking at the response I can see that reverse geocoding returns '3853 Anthony Rd, Frankford, WV 24938, USA' for 37.895767,-80.330698.
According to USPS.com this is a valid address
https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=1&companyName=&address1=3853+Anthony+Road&address2=&city=Frankford&state=WV&urbanCode=&postalCode=&zip=24938
though '3853 Anthony Rd, Anthony, WV 24938, USA' is also recognized as valid
https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=1&companyName=&address1=3853+Anthony+Rd&address2=&city=Anthony&state=WV&urbanCode=&postalCode=&zip=24938
You can report a data problem to Google following:
https://support.google.com/maps/answer/3094088

Is there a way to get current/max player count of Server via Steam Web API?

I only found this, but it doesn't show the player count(I guess there has to be a way to get it since the serverbrowser can show the player count as well):
http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=IP:PORT&format=json
=>
{
"response": {
"success": true,
"servers": [
{
"addr": "IP:PORT",
"gmsindex": 12345,
"appid": 730,
"gamedir": "csgo",
"region": -1,
"secure": true,
"lan": false,
"gameport": 27015,
"specport": 0
}
]
}}
I forgot to add that I need to get this info from a PHP script / my website. My (free) hoster does not allow PHP networking functions, so I'm very limited in this respect.
If this is not possible via the Web API (as #Andy said), is there a third-party API which does that for me?
You don't get this information from the Steam Web API. Instead, you need to use the RCON protocol and issue an A2S_INFO query to get this information.
Part of the response from that query includes both the number of players on the server and the total number of players the server can hold.
Players byte Number of players on the server.
Max. Players byte Maximum number of players the server reports it can hold.