I am using App Inventor 2 from MIT.
I have a fusion table with location column of type location. Using the FusiontableControls component I am able to write into the table and view the table using the WebViewer component, I am able to view the URL of the Table and the data is there.
However, when I use the URL from the Map view of the table, I see the map display on my app but without the locations in the table marked. However, if I go to the web address of the fusion table on a web browser on a pc, hit the location button, the map updates with the location information and next time I use the app, the map shows with the locations marked.
Is there a way to display the updated map using App Inventor without having to go manually and update the map page?
Update 1: As #Taifun suggested, I tried clear cache. It doesn't work.
Update 2: Further investigations show that by default, location info in FusionTable is not geocoded and that is why map doesn't show it. The question now is whether there is an API that forces geocoding when I insert the location info into the fusion table using app inventor 2?
Update 3: Taifun's suggestion worked. Storing address as lat,long makes the map automatically geocode and display locations. Earlier I was using the address returned from location sensor which returns something like 123 Main St, city,st 12345. Even though it is a valid address, it doesn't auto geocode.
Thanks a lot Taifun. (also for editing my post for clarity)
Define your location as one column location like this
instead of using two separate columns (lat and long) in your table. This should update your map automatically. See also https://support.google.com/fusiontables/answer/1012281?hl=en
Related
In application insights I can click on an exception and find nicely formatted information about it if I click on it.
This could look like this:
I would like to archive the same in an Azure Workbook. Here I can display all my exceptions with the KQL Term "Exceptions".
With the column settings I was hoping to be able to create a link to the Application insights page that shows me the same result like in the picture above.
I use this configuration:
Now I have a link, but when I click it there is just an empty pane:
Is there anything I misunderstand?
How do I need to configure my column settings to get a direct link to the Exception details like in clicking on the same item in Application Insights?
While not super obvious, the info bubble for the link settings shows:
The value in the column is expected to be an itemId of an exception telemetry item.
So as long as your query returns the itemId field, you can map that in the column settings:
(also, iirc, if the query returns a timestamp column, the details view will try to narrow down its search to just use a range around that time instead of trying to query a larger amount of time to find an item with that id)
Edit to add: if you are using thee Log Analytics based schema, AppExceptions the field is there but missing from documentation and the schema, there is an _ItemId field that is this field. I'm working with the App Insights/ Log Analytics teams to get this properly documented there.
Also, even if you're using the log analytics based app insights, you can also always query through the "app insights" resource and use the app insights schema the "old" way as well. (unless you're doing something specific in log analytics that the AI based way doesn't have?)
example:
left is query against app insights schema, with exceptions table and itemId column
right is query against logs schema, with AppExceptions table and _ItemId field, returning the same exact item by that id value. you can seee that the _ItemId field shows red squiggles like it isn't valid, but that is incorrect, you'll get the right row if you run the query.
I've seen some website, once you on the front page, it automatically populate the search field with your location. I want to implement the same thing for my directory site. One field, is for whatever they want to search for, and the second field is a location field for the user to enter the city or postcode they want to search on.
I want to pre-populate the location field, automatically once the user landed on front page. Any modules that I can use for this?
It will depend on which search engine/backend you use. Using Solr, you can use the Geolocation Field module in conjunction with Search API Location.
The Search API Location module adds the possibility of location based searching to the Search API module (currently only Apache Solr is supported as the service class).
Geolocation Field provides a field type to store geographical locations as pairs of latitude and longitude (lan,lng) as well as the necessary integration to display those locations through views, fields and using a number of different map providers.
Once configured, you will be able to pre-populate the location field by hooking into your search form using hook_form_alter.
We are working on a Frontend application, which adds new data to layers of GeoServer. The Frontend is using WFS-T Insert calls to add this data. We use views for these layers in GeoServer, to do some additional handling. The views we use are database views thus created on our Oracle database itself (e.g. we do not use the SQL Views of GeoServer). These layers based on views work all fine (solution applied with a disabled “primary key” for the view as described elsewhere on the internet).
The views we use contain an unique ID which is the unique ID of the “principal” table which is used in the view. For the unique creation of the ID’s for the “principal” table we chose to have the creation of this ID to be done by a sequence defined in Oracle. For using this sequence within GeoServer you can provide this “metadata” as indicated by the documentation: http://docs.geoserver.org/stable/en/user/data/database/primarykey.html
This solutions works fine, except when you use an (insert) trigger on the database view.
CREATE OR REPLACE TRIGGER OUR_VIEW_TRG
instead of insert or update or delete on vw_our_view
for each row…
If we perform a WFS-T insert call this results in the following exception:
org.geoserver.wfs.WFSTransactionException: Error performing insert:
Error inserting features Error performing insert: Error inserting
features Error inserting features ORA-22816: unsupported feature with
RETURNING clause
Without indicating GeoServer to use the sequence we get returned a feature ID, which will not correspond with our sequence numbering on the ID of the table (GeoServer simply returns the number of rows of the table, plus one). This results in an undesired situation where we have an incorrect ID at the Frontend after an WFS-T insert, only after a refresh of the browser the correct ID is being fetched.
Does anybody know if there is a way to make this work, e.g. for our customer changing the GeoServer code ourselves, and thus create our “own” version of GeoServer is no option. Stop using the views would imply extra WFS-T insert calls from our FrontEnd Application.
I'm having trouble figuring if there is a better way to filter array collection
.
This is my code:
$searchResults = $this->get('app.user.repository')->getUsersBySearchData($searchDetails);
$searchResults->filter(
function($user) use ($searchDetails){
$distance = $this->get('app.distance.calculator')->calculateDistance($user->getCity(), $searchDetails->getCity());
$distanceToTravel = $user->getDistanceToTravel();
if($distance < $distanceToTravel)
return true;
return false;
}
);
This returns all users from $searchResults filtered from already fetched collection.
I need to fetch all users form database whose location is not beyond distance which user enters in his profile and city entered in search form. To determine if that distance is not exceeded i have to calculate distance between location entered in search form to location of user and compare that distance to user profile distance.
Is it possible to do this kind of filtering on database level? I looked into Criteria API but couuldn't figure out how to do it.
Since you use an external module for filtering this is not possible. You should somehow be able to move filtering to database level. Since you need to add support for filtering to different locations I would suggest you store the locations in the database in a way that you can use them for filtering. Simply adding the name of the city will not be enough information.
I would like to suggest that you add longitude (location_longitude) and latitude (location_latitude) of your cities in the database and use this in your SQL query for filtering.
Check also this question for reference
You could also make a custom location mapping inside doctrine for making things work a bit smoother. Check the doctrine documentation chapter Advanced field value conversion using custom mapping types for an example.
This example is explaining a DBAL type a where a location (point) is stored in latitude and longitude values in the database.
I am using the gmap and location modules to display a map. I would like the users to be able to fill an address in a field and the map autocenters and autozooms to that address. Like maps.google.com does it.
Is there a module or any specific configuration I can do with drupal? Ultimately I would like to create an advance filter where user inputs country, province and address and posibly select from a drop down list. Something very similar to what it is done in the following link http://www.dei.gr/Default.aspx?id=30608&nt=18&lang=2&langid=1
Thanks.
The GMap Location Module is the one which fits the requirements most closely.
"Provides a map of all a site's nodes and a map of all of the site users."
If you'd like to create it by yourself:
Would suggest to create 2 tables - with labels and center-points - in order to populate these cascaded drop-downs.
The last input-box needs to geo-code the entered text - over the Google GeoCoder API.
Of course any centerpoint could be geo-coded - but you have a limit of 2.500 API requests per 24hrs on the PHP API,
unless being a premier customer (besides local results are just quicker). That's why it's recommend to store the center-points for each item in the drop-downs in a table - and only use the JS API (instead of the PHP API) for the last step.
The example which you provided reloads the whole page when changing the drop-downs, which should be avoided.