Add a place to google maps with node - node.js

I am working on a little project that I would allow me to update the location of a food truck that moves often.
I know there are apps that one could download but I'm hoping to avoid telling people to download ANOTHER app to keep up, instead it would be awesome to just have it searchable on google maps and have GPS directions to the truck available.
I see that the places API allows adding and deleting of places, I'm not sure how long that takes to update but I will figure that out once I can actually add a place.
Has anyone been able to succesfully do anything like this before with node? I understand that the javascript API will not do add requests so it seems node is the best solution here.

If you look at the places API, Google said:
When you add a place, the new place is available immediately in Nearby Searches initiated by your application. The new place also enters a moderation queue to be considered for Google Maps.
So your truck won't be visible on the Google Maps until after Google Maps decided to add it. But more than this, if you look at the deleting section:
A place can only be deleted if:
*The place was added by the application that is requesting the
deletion.
*The place add request has not successfully passed through
the Google Maps moderation process, and the place is therefore visible
only to the application that added it.
Which is, in other words, you would not able to update its position ever again after they approved your location.
In stead, you should use the Javascript API to make your own webapp, to get something like this http://planefinder.net/flight/CPA872
UPDATE
Unfortunately, Place Add has been deprecated on June 30, 2017 and will stop working on June 30, 2018. So you cannot use this method anymore. For further details please refer to the corresponding geo blog post.

Related

Where can I find a hook to customize the search via Shopware App?

I am prototyping a Shopware App right now, where I want to extend the search with our search API. We already have a working plugin in the store for that.
I found those two references for hooks:
https://developer.shopware.com/docs/resources/references/app-reference/webhook-events-reference
https://developer.shopware.com/docs/resources/references/app-reference/script-reference/script-hooks-reference
Seems like there is no webhook for the search at all and just a script-hook for a finished search. In the plugin, we could just extend the ProductSearchRoute and be completely flexible.
Are search extension not planned right now?
Cheers,
Tobias
I assume you want to alter the criteria for fetching the products. As of today this is not yet possible with non-self-hosted apps. You could use the app scripts to enrich or replace the contents of an already loaded page as you already mentioned. Obviously that comes with some drawbacks regarding performance. The capabilities of apps are being enhanced continuously though so there's chance search manipulation might become possible rather soon.

Is it possible to prevent modifications to the title of a Google Doc yet allow the contents of the Google Doc to be edited

My Problem
I want to be able to migrate my Google Docs to a regular website while maintaining the links I had created between my Google Docs. Frequently I link one Google Doc to another Google Doc. As a result, I have created something that is similar to a wiki. For example let’s suppose I had created two Google Docs: Google Doc #1 and Google Doc #2.
Subsequently let’s suppose I had created a link (a hyperlink) in Google Doc #1 to Google Doc #2. Of course that's an extremely simple example. Let’s make it more complex. Imagine I had created a couple of thousand Google Docs with many links (hyperlinks) between them.
Of course backing up those Google Docs would be trivial either by using Google Takeout or rsync. However, what would happen if I wanted to move those Google Docs to a regular website? Then the myriad hyperlinks I had created would fail to point to the documents on my regular website.
That is, on my regular website, if I were to click on the link on the page which contained the contents which had been contained in Google Doc #1 (https://my_regular_website.com/google_doc_001) then instead of opening a link on my regular website to the page which contained the contents which had been contained in Google Doc #2 (https://my_regular_website.com/google_doc_002) , the link would point to the original Google Doc #2 (https://drive.google.com/drive/folders/google_doc_002)
My Technical Question
I read that, “You can use the 'contentRestrictions.readOnly' field on a `file' resource to lock a file and prevent modifications to the title, uploading a new revision, and addition of comments.” Source: Protect file content from modification
However, I would like to prevent modifications to the title file yet allow the contents of the file to be edited. For example, I might name a file something like, “1cn2OX4U67mY925GzG80hRBYjpqq2conSi9xgYikgwIM” which is the unique portion of a Google Docs URL.
That way, on my regular website, by using a simple regex, I could “relink” documents that pointed to https://docs.google.com/document/d/1cn2OX4U67mY925GzG80hRBYjpqq2conSi9xgYikgwIM
Final Thoughts
I like using Google Docs as, dare I say it, a word processor. Sometimes I use Google Docs to write essays. Sometimes I use Google Docs to create documentation. Sometimes I use Google Docs to collaborate with others (instead of emailing). Furthermore, I often use Google Docs’ outline format, styles, and voice typing.
Sure, I suppose I could use an actual wiki. But although I’ve tried many different wikis over the years, I never enjoyed using them. I found them to be clunky and overly simplistic. Furthermore, I didn’t enjoy installing them and needing to back them up. At this point In time, I don't want to have to install and maintain any software on a VPS (virtual private server).
I checked the documentation you are referring to and what you are trying to achieve is not possible, making a document read only will prevent a new revision of the file to be created.
For instance that won't allow you to change comments, content and title. At this time it is not possible to prevent some modifications, just all or none.
Regards.

Problems with the Google Places API AddPlaceRequest - Android Studio

I'm in the process of creating an application on Android Studio which allows a user to select a location on a map and add some details to that location - E.g. Select a football pitch and add some details to it such as 5 a side football match on Sunday at 12 o'clock.
Once these details are saved that location is saved onto the map along with those details.
I've decided to use the Google Places API as it has the AddPlace feature. Instead of adding a business to the map like the API was intended for, I want to tweak it so it can add an event instead.
However, the example found here at:
https://developers.google.com/places/android-api/add-place
Does not work in my application.
Here are the screenshots:
Code Snippet
Any help would be greatly appreciated - Thank you
G
The Add A Place function of the Places API isn't a good fit for what you're trying to do. Add Place is designed to allow users to add places that don't currently exist in Google Maps' database. It sounds like what you want to do is attach some metadata to a place that has meaning only to your app.
So, you'll need some persistent server storage for this metadata. There are lots of ways to do this but you might want to look at Firebase Realtime Database as a solution.
Also, from the screenshot, it looks like your error comes from not having defined mGoogleApiClient in in your app.
When you want to make a connection to one of the Google APIs provided in the Google Play services library (such as Google Sign-In, Games, or Drive), you need to create an instance of GoogleApiClient ("Google API Client"). See here: https://developers.google.com/android/guides/api-client

Is it possible to perform a partial roll out in the Chrome web store?

This comment mentions a partial roll out in Chrome Web Store. Where can I find that feature? My extension has more than 8,000 users but I don't see any partial roll out feature and I'm afraid to send the next version to all users at the same time.
I don't think it's documented anywhere. And I was wrong!
Documentation link: Control how fast your app reaches users.
In CWS lingo this is called "Controlled Rollout".
If you don’t see the max deploy percentage control, it may be because of the following:
You have less than 10,000 users. Currently the “controlled rollout” feature is only available for items with at least 10,000 users.
You need to upload a newer (higher) version of a package to use the “controlled rollout” feature. We can’t apply a controlled rollout to an already published package, because it may have already reached 100% of users.
It should show on the Edit page after you upload a new version that's not published yet. Here's a mention of it and how it should look:
Also, I've never actually tried using it.
Update: In the new Webstore Dashboard it's called "Partial Rollout" and has the same 10k users requirement.

Gmail Contextual Gadget OAuth 1.0 to 2.0 migration

We have a Gmail Contextual Gadget, it is published in Google Apps Marketplace.
For OAuth1.0 to 2.0 migration, as recommended in https://developers.google.com/apps-marketplace/v1migratev2 we created a new version of our Gmail Contextual Gadget, published it in Google Apps Marketplace, and associated it with the old version.
Now, to the question: the old version of the gadget was installed in about 50 domains. What happens to them after September, 30? Do they migrate automatically? Or what do we need to do so that our users could continue using our gadget?
UPD:
As soitof pointed out, Step 4 of the migration guide suggests that we call 'PUT https://www.googleapis.com/appsmarket/v2/upgradableApp/listingID/cwsID/domain'
Yet, I am unsure about how to proceed from here. Namely, what the migration strategy should be.
The first thing is that we don't keep the list of domains where our gadget is installed,
we only have the number of domains. I suppose we could track the requests and build that list.
Here comes the second point: do we fire that PUT requests manually? It is not difficult for our 50 domains, but what if there were, say, 10000? My wild guess would be that we make the old version of our app fire that PUT request automatically, but I am not sure if that's a good idea.
I would welcome some advice, 'best practices', 'guidelines' etc. on how it is usually done.
No they will not migrate automatically, you have to migrate them. Its a simple task you just need a bit of info about your old and new app.
All the info is found here:
https://developers.google.com/apps-marketplace/v1migratev2
UPDATE:
So to migrate you will need two versions of your gadget published, one in the old market place and one in the new one.
So right now you have your old GamV1 gadget listed, you'll need to submit your new one for publishing. Once it is approved, and listed, you can begin the migration. You have to wait till it's published since you need information from its public listing.
You'll need to build a list of domains and perform the PUT on each one manually. I made a script that performed the PUT on a domain name, then made a wrapper script that fed it domains one by one.

Resources