location from to - http

I am trying to implement a map/direction based application using Google maps V3 API. So far I have been able to display the map and show directions for two locations selected.
the first one is my current location , the second one is the location of costumer (his/her information exist in my database).
All the markers are being displayed in the output properly.

Related

Get Lat/Long from City Auto Complete

I am using a plugin that provides a location field type (City/State/Country, etc) that uses the Google Maps API to autocomplete the field. I am using only the City field. It works as it should: start typing the city and the dropdown fills with possible city/country matches. Then I pick one. Is it possible to extract the lat/long coordinates from the selection made in the dropdown?
If so, how?

Location ID of cities changing in results from Geocoding Autocomplete API

I have noticed that Location IDs coming from the Geocoding Autocomplete API have been changing recently. I rely on location id to identify cities uniquely, so such changes cause us a lot of problems.
For instance city Lodz, Poland has currently location id NT_wTVzyarLKGygLvsTPZ4VYD while it used to be NT_ROlJ6fdWSgsrVm8xPoZ1qD.
As I understand (based on Mismatch of location id between Geocoding Autocomplete and Geocoding), location ID value is based on the attributes identifying the value. In my scenario, I am searching for cities, so there was no change in the hierarchy of data, base names, etc. It is still the same city, in the same country and geographical area.
Shall I expect more changes of location ids for cities? Was the change intentional and what caused it?

Google Analytics API and UI Report Users data not matching

I've extensively searched in forum and after that putting this question so that someone might be able to help me.
Scenario:
In Google analytics dashboard, we have created logical categories based on keywords within PagePath. For instance, if my PagePath contains keyword \sports\ we call it Sports Section category.
We capture the User count weekly from UI as shown below :
I am now trying to move this data in MySQL db using Talend Open Studio Data Integration.
I am using a componenttgoogleanalyticsinput where I can feed Dimensions and Metrics.
Problem:
I analyzed 2 days of data and found the following observation:
Date All User Sports Auto
01-Jun 2220088 325174 51825 (visible in image chart)
02-Jun 2950015 256390 80472 (not visible in above chart)
Total 5170103 581564 132297 (sum of above)
API : 5170103 581564 132297 (received from API)
UI : 4910532 553400 129652 (shown in UI)
So, the data on chart matches with what I'm getting from API BUT they both do not match with what is shown in UI number.
I visited this link to understand what those numbers mean on Google UI.
Problem is, what dimension and metrics should I take so that my API values matches with UI number?
I tried to take ga:PagePath, ga:Date as dimension and ga:Users, ga:pageViews as metrics but they're not working for me.

Using popup to select correct relational field and pass value back to an entry form

I am using Google App Maker with Cloud SQL to build an asset tracking database.
I have a couple tables with relations:
Asset List (Many to One with locations)
Locations (Many to One with Districts)
Districts (Many to One with Areas)
The issues is when populating new related location fields in an data entry form is that several districts may have locations with the same name. When using the standard drop down the same values appear and there is no way for the user to know which district the location is associated with.
Example: On the asset entry form drop down locations show:
- Shop
- Crew 1
- Crew 2
- Shop
- Crew 1
- External Vendor
I have 2 pages:
Assets - Datasource: Assets table
Entry form Datasource:inherited(assets) to enter new assets
Table View Datasource:Inherited(assets) to see asset that get entered )no edit)
Locations Pop-up
This seems to work as expected basically forms to navigate to correct Location and store it in a text box and a button with the On_Click property to send the textbox value to the data entry form on assets (not working) I can pass the value to a widget but can't figure out how to save it to the actual data source.
Currently using the location in the text box on this form should i be using Id?
I created a pop-up form which lets the user navigate to the correct location record ID by filtering on district. I am having trouble understanding how to actually write it back to the correct location field on the asset entry form. I am new to Java Script/Apps Script so the meaning of all the properties and how to use them is giving me trouble.
I tried setting a text box named SetLocation in the entry form and setting the value property to
#datasource.item.Location.Location
Then in the popup I set the button on_click to
app.pages.Assets.descendants.SetLocation.value =
widget.parent.descendants.PassLocation.value;
Pass Location is the name of the textbox on the popup where the correct location is stored.
Some suggestions to consider. In your popup set a dynamic property, call it 'CreateDatasource' or whatever suits your needs.
In your assets page form where you navigate to your popup (lets say it's a button that opens the popup from your form) put the following code:
var popup = app.popups.YourPopup;
popup.properties.CreateDatasource = widget.datasource;
popup.visible = true;
Lets say your popup content datasource is set to Locations, and your popup has some inputs that filter your locations and then there is a table that displays your filtered results. In this table you would select the appropriate location row and then your popup has a button that passes the location back to your asset form, with code like this:
widget.root.properties.CreateDatasource.item.Location = widget.datasource.item; //this would set the relation only assuming your asset relation end to locations is named 'Location'
widget.root.visible = false;
This would work assuming everything is set up correctly in your relations.

Drupal 7 OpenLayers Map Relationship

I have an OpenLayers Map that gives me a Table and a Map display of locations based on a Great-Circle. I have an Entity Reference from Locations to my Products content type. I want to display Products that are available at locations near me.
My problem is: I want to display two types of contact - Products and Locations. I want to display Products in a table and Locations in a map. How can I setup the table to pull the contextual arguments for the products?
I figured out that I didn't need to separate the data...just group by it and hide everything I don't want. I created the Relationship in Views and then added the Fields, then hid all the Location data I didn't want to see.

Resources