Where are JAR Library for Google Maps Distance Matrix API? - google-maps

I'm developing a Java server application with NetBeans, and I need to use Google Maps Distance Matrix API. I read Google and Github information and I saw a few YouTube videos, but I'cant find JAR files at GitHub and I'cant add libraries to my NetBeans'project...please, may you help me?

It looks like the Distance Matrix API is exposed via the Maven artifact identified as "google-maps-services-java" or Gradle artifact identified as: "com.google.maps:google-maps-services". To use this, setup a simple Maven project and include thisdependency as described in the README.md :
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>(insert latest version)</version>
</dependency>
To use it, as described in the README, you'll need a Google API key and you'll need to plug in the latest versino (currently 0.1.7, but 0.1.8-SNAPSHOT is in development).
Alternatively, you can just download the Jar from Maven Central:
Browse
Download.

Related

how to user oracle plm api jar in liferay

i am using liferay 7.4. when i need to using external jar, for example, poi, i will find the maven info, and modify build.gradle and bnd.bnd, after sync gradle, i can using the api.
but when i need using oracle plm api, i have both jars, AgileAPI.jar and pxapi.jar, but i don't know how to put the jars in my module.
i had readed https://liferay.dev/es/blogs/-/blogs/osgi-module-dependencies
, but i do not know how to use it in my case. please help me, thanks in advance.

WARNING: The 'Forge Design Automation v2' API is deprecated in favor of the 'Forge Design Automation v3' API npm package (aka ), please upgrade

I am following the tutorial for the Autodesk Forge - View your models. When I run debugging and got the following errors: [WARNING: The 'Forge Design Automation v2' API is deprecated in favor of the 'Forge Design Automation v3' API npm package (aka ), please upgrade.] How can I fix this? Thanks!
Design Automation API v2 is deprecated - that means the API and service are still working but you should migrate to the v3 API as soon as possible, and if you are new to Design Automation, you should avoid using v2 and go straight to v3. You can install the v3 API using
npm install autodesk.forge.designautomation --save
NPM registry - https://www.npmjs.com/package/autodesk.forge.designautomation
You cannot remove the deprecation message, it will disappear in a few months when the v2 API will be removed.
I also have an example using this new package located here, this example follows the steps described on the learnforge tutorial.

Google Drive API for Objective-C with CocoaPods not linking GTMOAuth2 and

I am trying to incorporate Google Drive API into my Objective-C app. I'm using this link. I setup the quickstart example and that works fine. For my app, I added the API using CocoaPods as directed. When I run the app, I get linker errors not finding GTMOAuth2, GTMSessionFetcher and GoogleAPIClient. Here is one example.
ld: warning: directory not found for option '-L/Users/k/Library/Developer/Xcode/DerivedData/DA/dntvfajcuzknsddygndaenxbqsii/Build/Products/Debug-iphonesimulator/GTMOAuth2'
Under Target->Build settings -> other linker flags
-ObjC -l"GTMOAuth2" -l"GTMSessionFetcher" -l"GoogleAPIClient" -framework "Security" -framework "SystemConfiguration" -lz
for run path search paths, I have #executable/Frameworks
Can some provide info on how to probably setup Xcode so it finds GTMOAuth2, GTMSessionFetcher and GoogleAPIClient that are setup by the CocoaPods.
You may want to try the installation process as discussed in Install a Google SDK using CocoaPods or in Google APIs for iOS which gives the following steps in adding a Google SDK to your iOS app:
CocoaPods is used to install and manage dependencies in existing Xcode projects.
Create an Xcode project, and save it to your local machine.
Create a file named Podfile in your project directory. This file defines your project's dependencies, and is commonly referred to as a Podspec.
Open Podfile, and add your dependencies.
Save the file.
Open a terminal and cd to the directory containing the Podfile.
Run the pod install command. This will install the SDKs specified in the Podspec, along with any dependencies they may have.
Open your app's .xcworkspace file to launch Xcode. Use this file for all development on your app.
Please also check the list of CocoaPods published by Google.
Furthermore, you may want to continue the setup using the approaches to add the library to your project as discussed in this GitHub post such as using GTM OAuth2 or Google Sign-In SDK and adding the framework to an Xcode project.
Lastly, to help you troubleshoot problems during installation, you may visit this guide.

MonoDroid and Google Maps: package com.google.android.maps does not exist

I am having trouble to incorporate Google Maps in an adroid app created with MonoDroid. I am using the MonoDevelop IDE.
I referenced the Mono.Android.GoogleMaps package (I noticed that the version is 0.0.0.0).
I created a MapActvity called LocationMapActivity. When I try to build the app I get the following error in LocationMapActivity.java: package com.google.android.maps does not exist.
Thanks in advance for your help!
EDIT: Make sure not to forget to set the correct target framework after installing the Google API.
The Google Maps library is not included with the base Android SDK, so I'm guessing that you haven't installed the Google APIs add-on. Xamarin has some documentation available here with details on what you need to do to install the add-on and set up an emulator that includes support for it.

Using closed-source dependencies with Maven

I have a closed-source project that I would like to build using Maven. It has a dependency on two java libraries which are not available in any public repository that I've been able to find (libGoogleAnalytics.jar and FlurryAgent.jar in this case, but the question applies to any closed-source dependency).
I would like anyone in my organization to be able to build the application using the exact same versions of the dependencies that I use to build the application. This includes my colleagues and our build-server.
How do I manage closed-source dependencies that maven doesn't know how to resolve?
Obviously, I could go to each person's machine and manually execute "mvn install:install-file" to get the binary into their maven repository, but manually managing dependencies like that defeats the purpose of a dependency manager.
As per maven's Internal Repositories documentation, I could set up a repository server somewhere and put the binaries there, which all the developers would then access. But that means I have a new server to maintain (or at least a new website on an existing server). It also means I have to worry about permissions to ensure that outside parties can't access the repository. It also means I have to worry about backups and availability now so that developers don't run into hiccoughs if the repository is unavailable.
All of these problems would go away for me if I could somehow use our existing scm (hg in this case, but it could be git or svn or whatever) to store the dependencies. Our source control repository is backed up already, it will basically always be available to developers doing builds, and its permissions have already been dealt with.
But I haven't been able to figure out how to manage maven dependencies using hg yet, if this is even possible.
It turns out that Manfred's answer didn't quite work for me. The app compiled, but it did not run on my Android device because the required google analytics classes were missing.
Following the links he supplied, I discovered this solution which is actually a little cleaner and worked properly.
In summary, I added the following dependencies to my pom.xml. The groupId, artifactId, and version were all made up by me using reasonable values:
<dependencies>
...
<dependency>
<groupId>com.google.android.apps.analytics</groupId>
<artifactId>libGoogleAnalytics</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.flurry</groupId>
<artifactId>FlurryAgent</artifactId>
<version>1.24</version>
</dependency>
</dependencies>
I then added a repository definition for where I'm storing the third party dependencies in my project's source tree:
<repository>
<id>third.party.closed.source.repo</id>
<url>file://${basedir}/../maven_repo_3rd_party</url>
</repository>
I then moved the jar files to the following location:
./maven_repo_3rd_party/com/google/android/apps/analytics/libGoogleAnalytics/1.1/libGoogleAnalytics-1.1.jar
./maven_repo_3rd_party/com/flurry/FlurryAgent/1.24/FlurryAgent-1.24.jar
Once I did that, my project compiled and ran exactly as if the third party dependencies were resolved from an official maven repo.
While I really think you should use a dedicated repository server and Sean Patrick is totally right about it here is a hack to get it to work.
Put the jar file in a libs folder just like you did in the days gone by (remember Ant.. ouch) .. and then declare a dependency to each jar using the scope system and a path.
An example can I did this for is described here
http://www.simpligility.com/2010/01/how-to-mavenize-a-typical-web-application-build-jasperserver-3-7-sample-webapp/
Specifically a dependency would e.g. look like this
<dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports-chart-themes</artifactId>
<version>3.7.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/jasperreports-chart-themes-3.7.0.jar</systemPath>
</dependency
Oh and now that I told you how to do it keep in mind that this is BAD practice and has a bunch of issues but it will work...
Use A dedicated Repository Server
As per maven's Internal Repositories
documentation, I could set up a
repository server somewhere and put
the binaries there, which all the
developers would then access.
Exactly. Set up a maven repository server with several repositories, e.g. these:
internal-releases
internal-snapshots
external-opensource
external-closedsource (this is where the lib we are talking about goes)
But that means I have a new server to
maintain (or at least a new website on
an existing server). It also means I have
to worry about permissions to ensure that
outside parties can't access the repository.
Yes, but a company that does serious software development should have an infrastructure like that. But if your company is serious about using Maven, there should probably also be a dedicated position for configuration management, and that person should administer this server.
It also means I have to worry about
backups and availability now so that
developers don't run into hiccoughs if
the repository is unavailable.
The standard repository servers (e.g. Sonatype Nexus) are rock solid. If it ever hangs, just restart the app server / servlet container it's running on. Also, once developers have downloaded a library from the repo, it remains in the local repo, so even if the repo is down, there shouldn't be a problem (but you can't reference a new dependency when the server is down).
Use your existing SCM as a maven repository
OK, if you really want to use your SCM as a maven repo, here's how to do it:
http://maven-svn-wagon.googlecode.com/svn/site/index.html
This article describes how to setup an SVN-based maven repository for your own project. But if you want to deploy a third-party to the repo, just create a pom with the config mentioned here and use that pom to deploy:deploy-file your library.
(There are other wagon / scm implementations also, and the configuration is slightly different, but the solution remains the same: create a pom according to the wagon implementation you are using and then do deploy:deploy-file (see more info on the usage page)