GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
accessing geonames through https  XML
Forum Index -> General
Author Message
rodneystover



Joined: 07/06/2012 07:30:15
Messages: 2
Offline

I am doing a city/state/country lookup using JSON from a secure https checkout page on my site. Because I am accessing http://ws.geonames.org/searchJSON, it makes my page not secure. Is there a way to securely access https://ws.geonames.org.....


source: function( request, response ) {
$.ajax({
url: "http://ws.geonames.org/searchJSON",
dataType: "jsonp",
data: {
featureClass: "P",
style: "full",
maxRows: 12,
name_startsWith: request.term
},
success: function( data ) {
response(
$.map( data.geonames,
function( item ) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
value: item.name,
cc: item.countryCode
}
})
);
}
});
},
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

a secure endpoint is only available for premium users.

Marc

[WWW]
rodneystover



Joined: 07/06/2012 07:30:15
Messages: 2
Offline

Marc, Thanks for the reply. So if I purchase one of the Best Price Plans to start out with, the only coding I would have to change would be the url and I suppose add a username type field for verification?
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

yes, the domain is different.

The free services on api.geonames.org actually also require a username, you are just using the deprecated server on ws.geonames.org

Marc

[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

yes, the domain is different.

The free services on api.geonames.org actually also require a username, you are just using the deprecated server on ws.geonames.org

ws.geonames.org is deprecated, use api.geonames.org instead
http://geonames.wordpress.com/2011/01/28/application-identification-for-free-geonames-web-services/

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team