So I'm running this code and all the points show up fine. But I still get the "Data may still be loading" tiles. I've double checked the table IDs, geocoding, column names etc... so now I'm at a loss. Anybody experience this before?
function changeByZip(formResults) {
geocoder.geocode( { 'address': formResults }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
map.setZoom(13);
layer.setQuery("SELECT 'Address' FROM " + tableid + " WHERE 'Zip' = '" + formResults + "'");
layer2.setQuery("SELECT 'Address' FROM " + tableid2 + " WHERE 'Zip' = '" + formResults + "'");
}
});
}
I have two layers because I have about 14,000 points. When I comment out either one of those layers, the data loading tiles go away and it displays as expected. For some reason, the two layers don't like each other?
Thanks in advance.
Edit: I discovered the column name was different from what the query was looking for.
Please take a look at this link:
https://developers.google.com/fusiontables/docs/troubleshooting
According to the troubleshooting guide:
Map tiles "Data may still be loading" message does not resolve
Cause: Fusion Tables is unable to understand the query in the FusionTableLayer. A few things to try:
Check the query object syntax. Any syntax error can trigger this
error message. To resolve it, fix your Fusion Tables Layers syntax.
See FusionTableLayer documentation at Google Maps Javascript API V3
Reference and Google Maps Javascript API Layers
Check the Table ID. Doublecheck that you are using the correct table ID.
Check column names. Column names are case-sensitive , so "Zipcode" and "zipcode"
are not the same. Multi-word column names need to be enclosed in
single quotes. See Fusion Tables SQL API: Reference.
Check your geocoding. Fusion Tables must understand the locations in your table
before it can map them. Location descriptions in your table, such as
addresses, must be geocoded. See "Geocoding Location Descriptions" in
the Fusion Tables Developer's Guide.
Related
Hy all, i am using grafana with rockset to collect real time series form our dynamodb database, but we have the next problem in the plugin maps.
My data with the next query:
select country,real,_event_time from commons.Players
is
'US' '0.5' '2020-05-27T08:40:51.548000Z',
'UK' '0.2' '2020-05-27T08:40:50.548000Z'
I read that i must pase the country code in the group by:
select
country,sum(real) as total ,_event_time
from commons.Players
group by _event_time,country
but this doesn't work, I select the correct type of location data (countries) but impossible to see anything.
I don't have problem with any kind of graph but in the map is impossible to my to see the information. I have read documentation and really I don't understand the query that i must use in this part to see the data.
Thanks for everything.
You didn't post your panel configuration so it is blind guess. Use query:
SELECT
_event_time AS "time",
country AS "code",
real
FROM commons.Players
and configure Map Data Options->Location Data: countries to "translate" 2 letter country code to map coordinates.
In App Maker, I am displaying a table and want to replace table cell data with different text using a data lookup from another table. Assume two tables, Departments and Employees.
Departments is two fields, DeptID and DeptDescription.
Employees is multiple fields including DeptID.
In the table listing for Employees, I would like to replace the DeptID with the DeptDescription. (The page datasource is Employees. I do not want to set up a relationship between the data models.)
I am guessing I want to do some scripting in the onDataLoad event for the table cell label for DeptID. I have this much so far:
app.datasources.Departments.query.filters.DeptID._equals = widget.datasource.item.DeptID;
app.datasources.Departments.newQuery().run();
widget.text = app.datasources.Departments.item.DeptDescription;
I know this is not correct, but am I close?
This answer is untested, but I wanted to present a possible solution that would not require a lot of DB calls, especially ones that make repeated calls to a server script which might consume a lot of processing time when you do line item calls.
Set up a separate datasource under the Department model. Change the default 'Query Builder' to 'Query Script' and add a parameter of type 'list(number)' or 'list(string)', this should match your Primary Key field type. Uncheck the 'auto load' option.
In your 'Query Script' portion enter the following code:
query.filters.Id._in = query.parameters.YourParameter;
return query.run();
Go to your Employees datasource that is supposed to generate your table and find your 'On Load' client script section. In this section enter the following code:
var departmentsDs = app.datasources.YourDepartmentsDs;
departmentsDs.properties.YourParameter = datasource.items.map(function(deptIds) {return deptIds.DeptID;});
departmentDs.load();
Now go the page that contains your table. If you have not already create a label widget do so now. In this label widget for the text binding enter the following:
#datasources.YourDepartmentsDs.loaded && (#datasources.YourDepartmentsDs.items).map(function(Id){return Id.Id}).indexOf(#widget.datasource.item.DeptID) !== -1 ? #datasources.YourDepartmentDs.items[(#datasources.YourDepartmentsDs.items).map(function(Id){return Id.Id}).indexOf(#widget.datasource.item.DeptID)].DeptDescription : 'Unable to retrieve Dept Description'
As stated this is untested and I wrote the code from memory without App Maker in front of me so it may require some additional tweaking. Going with the first option presented by J.G. would also be a very viable solution though. And I apologize but the code formatter does not seem to be working for me.
1 way) Create an aggregate table that joins your tables if you need to bypass using the relations feature. This way you can use sql to join the two tables in the datasource definition
2) if you don't want to make a new table. Change the text from a value binding to "more options"
=getDescription(#datasource.item.DeptId)
and then the code you wrote in a client side script
function getDescription(id){
google.script.run
.withSuccessHandler(function successHandler(result){ return result;})
.withFailureHandler( function failureHandler(e){ console.log(" Failed" +e);})
.queryValue(id);
}
server side script:
function queryValue(id){
var query = app.models.Departments.newQuery();
query.filters.DeptID._equals = id;
var results = query.run();
return results[0]["DeptDescription"];
}
that last line might be results[0].DeptDescription
I'm trying to search for businesses with disabled (wheelchair) access. Google led me to https://developer.here.com/documentation/places/topics_api/media-type-place.html where the 'Media Types' documentation describes 'Extended Attributes', one of which is disabledAccess. I cannot see this attribute in my search results, or see a way to query for businesses with this attribute either available, or set to a certain value.
My Javascript currently looks like:
request('https://places.cit.api.here.com/places/v1/discover/explore' +
'?at=' + userLocation.lat + ',' + userLocation.lng +
'&cat=restaurant' +
'&app_id=' + appID +
'&app_code=' + appCode)
This returns results but no mention of extended attributes is apparent. The word 'extended' or 'disabled' is not present in the response.
I have tried the demo lat,lng from a google example {lat: -33.866, lng: 151.196} and also that of New York City {lat: 40.71, lng: -74.006}. The docs do say that if no extended attributes are available for a business then the element is omitted completely from the results, but surely there would be something for one of the businesses at those locations.
I tried adding a &cs=disabledAccess to the query, but got an error that disabledAccess is not a valid category.
How do I get extended attributes in the results, or for bonus points, query based on extended attributes?
Since you're only looking at two locations, it's very likely that the locations you queried had no 'Extended Attributes' at all. I would try it at a few chain restaurants/areas in tech cities (SF/NY should be fine) but it's unfortunately likely there's nothing you can do here since the data is sparse.
Hello i am using simple google map places api to get near by atms for users. My client lives around new york and for some strange reason api shows zero results for that place, but works fine near me (pakistan) . I searched for it a little and found out it was google's issue and some other places were also experiencing the same problem. But i never quite found any solution for this.
This is the get call i use
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.7128,74.1059&radius=10000000&keyword=atm&key=MY_KEY
I would really appreciate the help. Thank you :)
Google place nearby search maximum 50,000 meters (31 miles) . if you try enter more than 50,000 it not work proper.
There is another way for find all ATM in a city. google provide Text Search Requests
https://maps.googleapis.com/maps/api/place/textsearch/json?query=atm+in+Reno,NV,89501,USA&key={API_KEY}
query = keyword + in + city Name
for get city name using latitude longitude
http://maps.googleapis.com/maps/api/geocode/json?latlng=39.52963,-119.81380&sensor=true
For more information how to get city name using latitude longitude
https://developers.google.com/maps/documentation/geocoding/start?csw=1#ReverseGeocoding
for more information about how to use Text Search Requests
https://developers.google.com/places/web-service/search
OR (second way)
There is another way for find all ATM in a city.
Open Google Maps .
create 10-12 or more points latitude , longitude value to trigger
request.
Then use a loop to find all places within these points.
If you want more appropriate results, increase first trigger points
for your requests.
- It is just a logic i created in php.
$triggerPoints = array("lat1,long1", "lat2,long2", "lat3,long3",....);
foreeach(triggerPoints as $tP){
$requestUrl = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=$tP&radius=[YOUR_RADIUS_VALUE]&type=[YOUR_TYPE]&name=panera&key=[YOUR_KEY_HERE";
$results = file_get_contents($requestUrl);
//Do what you want with response JSON data
}
SHORT ANSWER: Use logical types with your needs.
In my case i used food types instead of supermarket. In some cases, my local market named A101 wasnt found under supermarkets. To find which keywords is best for you, you can search below url with your location and map_key and find most common keywords under types for each query and use it.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=40.986527896166244,%2029.24326049097467&rankby=distance&keyword=a101&key=YOUR_MAP_KEY
I am not an access professional but use it to help me make my job easier so please excuse my terminology. I will try and explain as best I can.
I need to create a data base that stores the contact and other information about vendors that we use and specifically the services and the countries that they can provide services in but some of these vendors can provide services in multiple countries and can also provide multiple services. So would prefer to be able to use a list with multi-valued entries for ease of use and to prevent having to duplicate the vendor entries for deferment countries and services. (This i can do)
Then i need to create a search form that performs searches on key words, ether the country name, the service or the vendors name. I did this based on the following code i got from the internet:
Private Sub Command9_Click()
Dim strsearch As String
Dim strText As String
strText = Me.TxtSearch.Value
strsearch = "SELECT * from Query1 where ((Decipline Like ""*" & strText & "*"") or (Country_OO Like ""*" & strText & "*""))"
Me.RecordSource = strsearch
End Sub
(The search part in itself works fine)
The problem: When I try to use the search with the multi-valued list
box I get the following error: Error 3831 the multi-valued 'Country_OO'
cannot be used in a WHERE or HAVING clause.
Debug.Print strsearch SELECT * from Query1 where ((Decipline Like "a") or (Country_OO Like "a"))
I know most of you on here are not fans of the Multi-valued list but in this case it would work great. Is there a way around this or and alternative that you can suggest? Maybe a way that i can select the from a list then it adds the txt only to the master file?
Taking your (good!) question title to Google leads directly here, which suggests that
WHERE Country_OO.Value Like "*a*"
should work.
But it would really be better to not use multi-valued fields. Ever.