Select to view content in your preferred language

Replace google api key with that of Arcgis javascript key

1167
4
01-14-2014 08:16 PM
sunithanaik
Emerging Contributor
Hi,

We are trying to replace google map api key "https://www.google.com/jsapi?key='+strGoogleMapKeyTemp" with that of ArcGIS javascript key. Can you please let us know the syntax for doing so?

There are two api access key created in ArcGIS when an application is
created, one is client id and client secret,which key needs to be used in order to access the jsapi from ArcGIS?

Thanks,
Sunitha
0 Kudos
4 Replies
JakubMalec
Deactivated User
The API itself doesn't require any key to use. You just need to include the javascript from here: http://js.arcgis.com/3.8/ .

The client id and secret key are needed only if you have some non-public or non-shared resources on your ArcGIS online account which you want to access by your application.
0 Kudos
sunithanaik
Emerging Contributor
thanks for the response!

We are actually using the jquery 14 frame work which is referring to the format for google api key as mentioned in the earlier thread,
because of which it is not taking the format of just http://js.arcgis.com/3.8/.

The map is not been displayed when we we have replace all the code for google api with that of esri javascript 😞



Regards,
Sunitha
0 Kudos
JonathanUihlein
Esri Regular Contributor
My advice would be to check out the documentation (both for the Esri JSAPI and JQuery).
It might end up answering some very basic questions you have and save you many hours.

On the flip side, if you feel you can reproduce the issue using http://jsfiddle.net you can post it here for us to take a look.

Thanks!
0 Kudos
sunithanaik
Emerging Contributor
Thanks for the response!

We were able to successfully replace the google api with that of esri arcgis javascript, without having to use any key.


However, there is an enhancement to the requirement. Now we have to geocode the address and display the locations on the map.
Geocode requires credit. To try if the geocode is working , I want to use the 50 credits that comes with the free developer account.

How can I link my developer accounts to use this credit and get the geocode done for few test addresses in my javascript api?

It is necessary to install ARCGIS Server and publish the service to be used in my javascript or is there a simple way of doing this?

Thanks
Sunitha
0 Kudos