lundi 23 novembre 2015

Google Maps API (xml file path) Javascript

I found a Google Maps API which uses google appengine. The code is mentioned below:

> function MedicareDataSource() { }
> 
> MedicareDataSource.prototype.getStores = function(bounds, features,
> callback) {   var that = this;   var center = bounds.getCenter();  
> var audioFeature = this.FEATURES_.getById('Audio-YES');   var
> wheelchairFeature = this.FEATURES_.getById('Wheelchair-YES');
> 
>   var where = '(ST_INTERSECTS(geometry, ' + this.boundsToWkt_(bounds)
> + ')' +
>       ' OR ST_DISTANCE(geometry, ' + this.latLngToWkt_(center) + ') < 20000)';
> 
>   if (features.contains(audioFeature)) {
>     where += " AND Audio='YES'";   }   if (features.contains(wheelchairFeature)) {
>     where += " AND Wheelchair='YES'";   }
> 
>   var tableId = '12421761926155747447-06672618218968397709';   var url
> = 'http://ift.tt/1gSa8la' + tableId +
>       '/features?callback=?';
> 
>   $.getJSON(url, {
>     key: 'AIzaSyAtunhRg0VTElV-P7n4Agpm9tYlABQDCAM',
>     where: where,
>     version: 'published',
>     maxResults: 300   }, function(resp) {
>     var stores = that.parse_(resp);
>     that.sortByDistance_(center, stores);
>     callback(stores);   }); };
> 
> MedicareDataSource.prototype.latLngToWkt_ = function(point) {   return
> 'ST_POINT(' + point.lng() + ', ' + point.lat() + ')'; };

Now, in place of

 var tableId = '12421761926155747447-06672618218968397709';
 var url = 'http://ift.tt/1gSa8la' + tableId +
      '/features?callback=?';

I would like to use mySQL tables. How do I achieve it ? I have a table called "dealer_address" and I want to use it. Please suggest.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire