Giter VIP home page Giter VIP logo

citymap's Introduction

citymap

Intro

Search places on a map, filtering by City Boundaries.

I recently wrote a 5 part series that shows how to do mapping, and searching which can be filtered to within City Boundaries. I use Vue.js, Google Maps and Places, GeoJSON, and polygon filtering. Citymap is a stripped down blend of a bunch of small parts. I dont claim for it to be a shining illustration of UI, component layout, or error checking. It's an end to end example, done in limited time.

image

Features

  • Vue.js + Vuetify UI and component setup
  • example of the use of Google Maps and Places API
  • example of using Eventbus for communication
  • example of using GeoJSON to get City Boundaries
  • example of filtering search results against polygons

The Articles

You can get to the articles via this box set page

Prerequisites

  • Google API account set up. You will be generating an API key for four access to four APIs: Geocoding, Geolocation, Maps, and Places:

image

See more about this in Location, Location, Location (Part 2)

Next Steps (code quality)

To make this more robust, there are several things that could be done:

I wrote this quickly, along with the articles that go with it. I have some insight as to how to do several things better:

  • better layout of Vue.js components - dont depend on App.vue for so much
  • needs better error checking
  • there is no notion of cleaning up data structures when going betweeen cities - this could chew up memory quickly
  • the method of finding the correct element in GeoJSON is not quite there. I should look further for a Polygon or Multipolygon in some cases
  • configuration data (specifically API keys) should be stored in an external file
  • could make better use of Vuetify - this example is a bit ugly

Next Steps (features)

To go beyond this example, in terms of features, I can hint at a few directions:

  • be able to search among several APIs (not just Google Places)
  • be able to search categories, in addition to keywords
  • be able to specify search radius
  • or, draw a polygon to search within
  • be able to combine results from several APIs
  • get more information from each search result (drill down for details)

Those are just some of the quick ideas. I can think of many more, and there is some cross pollination I could do with my ThereThenThat and MediaShiskebab projects.

Customize configuration

See Configuration Reference.

citymap's People

Contributors

danielsmith avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.