WP Manifestindependent plugin directory
manifest / utilities / location-finder

GeoT City Replacer

Visit Live Demo

by Sajid Khan · github.com/sajidsdk19/location-finder · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/sajidsdk19/location-finder/archive/refs/heads/main.zip

A comprehensive location detection application built with Streamlit that provides precise geolocation services through browser-based detection and manual coordinate lookup.

🌐 Live Demo

Try it now: https://locationfinder.streamlit.app/

✨ Features

🎯 Core Functionality

  • Browser-Based Location Detection: Utilizes HTML5 Geolocation API for precise, real-time location detection
  • Manual Coordinate Input: Backup option for entering latitude/longitude coordinates manually
  • Reverse Geocoding: Converts coordinates to human-readable addresses using OpenStreetMap's Nominatim API
  • Interactive Maps: Embedded OpenStreetMap visualization for detected locations
  • WordPress Plugin: Ready-to-use plugin for integrating location detection into WordPress sites

🎨 User Interface

  • Modern, responsive design with gradient backgrounds and glassmorphism effects
  • Tabbed interface for easy navigation between features
  • Real-time loading indicators and error handling
  • Mobile-friendly and works across all modern browsers

🔒 Privacy & Security

  • No data storage: Your location is never saved or stored
  • Browser-only processing: All detection happens client-side
  • No tracking: No cookies or user tracking implemented
  • Open source: Transparent and auditable code

🚀 Getting Started

Prerequisites

  • Python 3.7 or higher
  • pip (Python package installer)

Installation

  1. Clone the repository

    git clone https://github.com/sajidsdk19/Location-finder.git
    cd Location-finder
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the application

    streamlit run app.py
  4. Access the app

    • Open your browser and navigate to http://localhost:8501

📦 Dependencies

streamlit
requests

🛠️ How It Works

Browser Detection

  1. User clicks "Detect My Location" button
  2. Browser requests permission to access location
  3. HTML5 Geolocation API retrieves precise coordinates
  4. OpenStreetMap Nominatim API converts coordinates to address
  5. Results displayed with interactive map

Manual Input

  1. User enters latitude and longitude coordinates
  2. Application validates input
  3. Reverse geocoding fetches location details
  4. Address and map displayed

📱 Browser Compatibility

Browser Support Notes
Chrome ✅ Excellent Recommended
Firefox ✅ Excellent Works great
Safari ✅ Good May need permission
Edge ✅ Good Works well
Mobile ✅ Excellent Usually most accurate

🌍 WordPress Plugin

The repository includes a WordPress plugin (geocity.zip) that enables location-based content on WordPress websites.

Plugin Features

  • Simple shortcode [geot_city] for displaying visitor's city
  • IP-based location detection using ip-api.com
  • Automatic fallback for localhost testing
  • XSS protection with proper sanitization
  • Compatible with all modern WordPress themes

Plugin Installation

  1. Download geocity.zip from the repository
  2. Go to WordPress Admin → Plugins → Add New
  3. Click "Upload Plugin" and select the zip file
  4. Activate the plugin
  5. Use [geot_city] shortcode anywhere on your site

Plugin Usage Example

Welcome to our site! You're visiting from [geot_city].

📍 Accuracy Information

  • GPS devices: Usually 3-5 meters
  • Smartphones: Usually 5-10 meters
  • WiFi/Cell: Usually 10-100+ meters
  • Desktop: Varies widely (IP-based fallback)

For best accuracy, use a smartphone with GPS enabled.

🔧 Technical Details

Technologies Used

  • Frontend: HTML5, CSS3, JavaScript
  • Backend: Python, Streamlit
  • APIs:
    • OpenStreetMap Nominatim (Reverse Geocoding)
    • HTML5 Geolocation API (Browser Detection)
    • ip-api.com (WordPress Plugin)

Project Structure

Location-finder/
├── app.py                 # Main Streamlit application
├── requirements.txt       # Python dependencies
├── geocity.zip           # WordPress plugin
├── geocity.php           # Plugin source file
└── README.md             # Documentation

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

👨‍💻 Developer

Sajid Khan

📄 License

This project is open source and available for personal and commercial use.

🙏 Acknowledgments

  • OpenStreetMap for providing free geocoding services
  • Streamlit for the amazing web framework
  • ip-api.com for IP-based geolocation services

⭐ If you find this project useful, please consider giving it a star on GitHub!