Passing waypoint info to comgooglemaps (Google Maps URL Scheme) - javascript

I am in the process of creating an app using the Google Maps api to generate random biking routes (http://sutsurikeru.com/maps) and it works fine so far, but the issue I am having is passing the generated route, including the following info to the google maps app:
Start Destination
Way-point (randomly generated using https://gis.stackexchange.com/questions/25877/how-to-generate-random-locations-nearby-my-location)
End Destination (same as the start destination)
Once I've got all the lat/long information I pass it to a button that is created when the route is generated so that it can pass the route to the Google Maps App, but I am unsure how to pass the way-point as there is no mention of it in the docs - https://developers.google.com/maps/documentation/ios-sdk/urlscheme
$('#goRide').append('<a class="goridebtn" href="comgooglemaps://?saddr=' + address + '&daddr=' + address + '&directionsmode=bicycling">Go ride</a>');
I guess my question is then, can I include the way-point information when I am passing it to the Google Maps App?

i couldn't find the answer for that too , so i ended using:
"comgooglemapsurl" instead..
this way you can pass a full url (same onese used in the browser)
the format will be something like this:
comgooglemapsurl://www.google.com/maps/dir/STARTING_POINT/WAYPOINT_1/WAYPOINT_2/WAYPOINT_3/WAYPOINT_4/DESTINATION
you can add as many points as u wish
comgooglemapsurl://www.google.com/maps/dir/24.848607,46.660478/24.748607,46.760478/24.778607,46.784478
https://developers.google.com/maps/documentation/urls/ios-urlscheme

Looks like you can add waypoints using the +to: variable inside the daddr text. The following example shows this in use:
comgooglemapsurl://?saddr=55.852866,-4.323120&daddr=56.019015,-3.372803+to:55.972934,-3.279419+to:55.932952,-3.284912+to:56.022085,-3.565063

Related

Google spreadsheetID is NOT given when I publish to the web

The google sheets API documentation states I need to have a sheetID that would show up in the url here (denoted {SHEETID}):
https://docs.google.com/spreadsheets/d/{SHEETID}/edit#gid=0
However, when I publish to the web, the URL returned is something along the lines of:
https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vcasfsaf2123Mt_basdf34grGd_1231sfak_D32141sfasfqwer_phealsjsmfdafcmr2S_-n-wzUp/pubhtml
I have also already tried just using the sheetID from the unpublished url and that does not work either.
I'm trying to pull data with react from this sheet but am unable to do so. Does anyone know how else I can get the sheetID?

Google Static map without api key gives 403(forbidden) error

I am creating pdf document using jspdf.
In the document i have to display google map, so i used static google maps https://developers.google.com/maps/documentation/static-maps/intro.
This works fine on localhost.
But on deploying the app it gives error 403(forbidden)
i also added parameter sensor=false in static map url.
Request URL : https://maps.googleapis.com/maps/api/staticmap?center=47.3857009,9.2798472&zoom=15&scale=2&format=png&size=600x400&maptype=roadMap&sensor=false&markers=size:mid%7Ccolor:0xff0000%7C47.3857009,9.2798472
Thanks.
Because you MUST include API key in your request as a parameter. Without it you don't have an access to the Google Maps API thus 403 error code which clearly states: access is forbidden. You even provided a documentation which shows an example of the request:
https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap
&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318
&markers=color:red%7Clabel:C%7C40.718217,-73.998284
&key=YOUR_API_KEY
The last key parameter is required to make it working.

Routes marking in android Google Maps

How do I add a custom route in android using google maps. I am building an app similar to mapmyhike. Is it possible in Maps API V3?
Consider looking into this link
A DirectionsRoute contains a single result from the specified origin
and destination. This route may consist of one or more legs (of type
DirectionsLeg) depending on whether any waypoints were specified.
[EDIT]
Google Maps Directions API v3 for Android provide routes in the Encoded Polyline Algorithm Format.
So you can try something as follows:
android-draw-route-map-between-two-geopoints
You can pass latitude and longitude to this to get route directions for two points
String uri = "http://maps.google.com/maps?saddr="+ latitude + "," + longitude + "&daddr="+ latposition + ","+lngposition;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity").addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
context.startActivity(intent);

place search api for nokia maps in http format?

I need an api for nokia maps place search with query and place term.
The API should be in http(url) format.
like this:
http://api.nokia.com/query=hotels/location=lat,long
It looks like you may be after the RESTful Places API. The latest documentation can be found here: http://developer.here.net/places
If you are after hotels, you could base your query on the example here:
http://developer.here.net/apiexplorer/examples/api-for-rest/places-search/places-search-by-category.html
The following URL will return a set of hotels in central Berlin (around 52.51N,13.4E)
http://demo.places.nlp.nokia.com/places/v1/discover/explore?cat=hotel&at=52.51,13.4&app_id=_peU-uCkp-j8ovkzFGNU&app_code=gBoUkAMoxoqIWfxWA5DuMQ&accept=application/json
See this link http://demo.places.nlp.nokia.com/places/v1/discover/explore?at=19.1273%2C72.8515&tf=plain&size=10&app_id=7vivA7jIFlZh9WX_B0cd&app_code=6ptUAobtF0RFJ9CkfX7geg&Geolocation=geo%3A19.0254%2C72.8401%3Bcgen%3Dmap . You can customize your search on left panel

Can we export mql query output to Google Docs

I am trying to create a freebase acre application which can keep track of certain users records and export the mql query output to Google Docs.
Is it possible to export mql query output to Google Docs in acre?
Edit #1
I found out this doc by which i can export data to Google Docs using javascript.
Edit #2
I am able to upload files to drive but i need to create a Spreadsheet with it. Could it be possible?
This is possible using Google Drive SDK. I am successful in exporting the query output but not able to share the code here.
If you can export the results as CSV, you can create a Google Spreadsheet with them. The important point is to remember to set:
convert=true
Query parameter on insertion which will ensure that your file is converted correctly to a GOogle Spreadsheet.

Categories