Skip to content

Focus on User's Location on First View #3

@mattkendall

Description

@mattkendall

Older versions of the site focused in on sites "near" the current location. Much of the bones are still in place and just need to be connected together.

There is a service available in services.js that will return a JSON structure with an overview of the map data, including a bounds object that surrounds all properties within 1 mile. The structure looks something like this:

{
  "dates": ["2015-02-05"], 
  "towns": ["Cary"], 
  "closest": {
    "bounds": [-78.9149484920922, 35.8291827138123, -78.8841665382659, 35.8632290159], 
    "permits": []
  }, 
  "categories": ["rezone", "subplan"]
}

The bounds object needs to be pulled from the service and then fed into the maps object in the gmap.js service. There's an example of manipulating the bounds here: https://github.com/mattkendall/cfa-cary-django-site/blob/pivot-data/permit_map/static/permit_map/js/map-directives.js

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions