
Security News
arXiv Is Rate Limiting Authors Following a Flood of AI Slop Submissions
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.
smart-google-maps-nestjs
Advanced tools
Author: Nurul Islam Rimon
Repository: https://github.com/nurulislamrimon/smart-google-maps-nestjs
Production-grade NestJS module for Google Maps APIs.
npm install smart-google-maps-nestjs
Peer dependencies (must be installed):
npm install @nestjs/common @nestjs/config axios
Optional dependencies for caching:
npm install @nestjs/cache-manager cache-manager
import { Module } from '@nestjs/common';
import { SmartGoogleMapsModule } from 'smart-google-maps-nestjs';
@Module({
imports: [
SmartGoogleMapsModule.forRoot({
apiKey: process.env.GOOGLE_MAPS_API_KEY,
}),
],
})
export class AppModule {}
import { Injectable } from '@nestjs/common';
import { GoogleMapsService } from 'smart-google-maps-nestjs';
@Injectable()
export class LocationService {
constructor(private readonly mapsService: GoogleMapsService) {}
async getCoordinates(address: string) {
return this.mapsService.geocode(address);
}
}
interface SmartGoogleMapsOptions {
apiKey: string;
baseUrl?: string; // Custom API base URL
timeout?: number; // Request timeout in ms (default: 10000)
cache?: {
enabled: boolean; // Enable/disable caching
ttl: number; // Cache TTL in ms (default: 3600000)
};
rateLimit?: {
enabled: boolean; // Enable/disable rate limiting
maxRequests: number; // Max requests per window
windowMs: number; // Time window in ms
};
}
Convert an address to latitude/longitude coordinates.
const result = await mapsService.geocode('1600 Amphitheatre Parkway, Mountain View, CA');
// Returns: { lat: 37.422..., lng: -122.084..., formattedAddress: '...' }
Convert coordinates to a human-readable address.
const result = await mapsService.reverseGeocode(37.422, -122.084);
// Returns: { formattedAddress: '...', addressComponents: [...], placeId: '...' }
Search for places by query.
const results = await mapsService.searchPlaces('restaurants in San Francisco');
// Returns: PlaceSearchResult[]
Get detailed information about a place.
const details = await mapsService.getPlace('ChIJN1t_tDeuEmsRUsoyG69frY4');
// Returns: PlaceDetailsResult
Calculate distance and duration between two points.
const result = await mapsService.distance('San Francisco, CA', 'Los Angeles, CA', {
mode: 'driving',
units: 'metric',
});
// Returns: { distance: '615 km', distanceValue: 615000, duration: '...', durationValue: ... }
Get turn-by-turn directions.
const result = await mapsService.directions({
origin: 'San Francisco, CA',
destination: 'Los Angeles, CA',
mode: 'driving',
});
// Returns: DirectionsResult with routes, legs, and steps
Geocode multiple addresses in batch.
const results = await mapsService.batchGeocode([
'1600 Amphitheatre Parkway, Mountain View, CA',
'1 Apple Park Way, Cupertino, CA',
]);
// Returns: GeocodingResult[]
Clear the cache manually.
await mapsService.clearCache();
For dynamic or environment-based configuration:
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { SmartGoogleMapsModule } from 'smart-google-maps-nestjs';
@Module({
imports: [
ConfigModule.forRoot(),
SmartGoogleMapsModule.forRootAsync({
useFactory: (configService: ConfigService) => ({
apiKey: configService.get<string>('GOOGLE_MAPS_API_KEY'),
cache: {
enabled: true,
ttl: 3600000,
},
rateLimit: {
enabled: true,
maxRequests: 50,
windowMs: 1000,
},
}),
inject: [ConfigService],
}),
],
})
export class AppModule {}
import { Module } from '@nestjs/common';
import { SmartGoogleMapsModule, GoogleMapsService } from 'smart-google-maps-nestjs';
@Module({
imports: [
SmartGoogleMapsModule.forRoot({
apiKey: process.env.GOOGLE_MAPS_API_KEY!,
cache: {
enabled: true,
ttl: 3600000, // 1 hour
},
rateLimit: {
enabled: true,
maxRequests: 50,
windowMs: 1000,
},
}),
],
})
export class AppModule {}
MIT
FAQs
Production-grade NestJS module for Google Maps APIs
We found that smart-google-maps-nestjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.

Research
/Security News
A new GhostAction wave hits hundreds of GitHub repos, expanding CI/CD secret theft to cloud and AI credentials in source code and git history.

Research
/Security News
Tensorlake npm SDK version 0.5.144 was compromised in a ChainDrop / Shai-Hulud attack, delivering credential-stealing malware.