Git Product home page Git Product logo

savvymapper's Introduction

Documentation

What is SavvyMapper?

SavvyMapper is a map plugin for GIS professionals, and for smart WordPress developers who need access to real GIS services and the power of Leaflet.js.

SavvyMapper creates relationships between WordPress posts (or custom posts) and queries against GIS data.

It provides shortcodes for displaying maps and feature attributes, and gives you easy access to the map and layer objects so you can customize them as needed.

Setup and Configuration

  • Install this plugin the standard WordPress way
  • In the SavvyMapper settings add one or more connection type. You may need to enter API keys or other configuration parameters for the service you're connecting to in this step.
  • In the SavvyMapper Post Mapping settings set up an association between a post type and the connection you set up in the previous step.
  • Now when you edit a post of that type, you will see a new Metabox where you can associate the post you're editing with GIS data in the connected service.
  • In the post body add one or more shortcodes as documented below. Save and then view your post.

Following these steps should get you started. For additional functionality please see the documentation for developers.

Shortcodes

Displaying attributes

[savvymapper attr="/attribute name/"]

The Attribute shortcode has the following optional attributes:

  • multiple = ('unique'|'all'|'first')
    • unique -- If multiple features match the query, show unique values for this attribute
    • all -- If multiple features match the query, show all values, even if they're repeated
    • first -- If multiple features match the query, show the first value. Note that the value may be empty.

Displaying the current post's map

[savvymapper show="map"]

The Map shortcode has the following optional attributes:

  • show_markers = (1|0)
    • 1 -- Show the default Leaflet.js marker (or line or polygon) for this post's associated feature
    • 0-- Make the feature invisible.
  • show_popups = (1|0)
    • 1 -- Show the attributes popup when the feature is clicked
    • 0-- Don't show the attributes popup when the feature is clicked
  • zoom = (default|1-19ish)
    • default -- Fit the map bounds to the feature's bounding box
    • 1-19ish -- Set map zoom level manually. Most slippy basemaps support levels 1-19, but some go to 21 or beyond.
  • lat = ('default'|latitude), lng = ('default'|longitude)
    • Set the centerpoint of the map

[savvymapper show="map" show_markers="1" show_popups="0" zoom="6" lat="45" lng="-93"]

Filters, actions, etc.

Please see the Filters and Actions Documentation.

Styling Attributes and Maps

Please see the Styling and Attributes developer documentation

Known Bugs

This plugin loads cartodb.js which includes its own copy of Leaflet. If other plugins are also loading leaflet, there will likely be conflicts. These conflicts may manifest themselves in various ways including not finding loaded plugins.

Release Log

0.1.1 Beta updates

  • Changed [savvy] shortcode to [savvymapper]

0.1.0 Initial Release

  • Support for CartoDB
  • Support for remote GeoJSON files
  • Support for caching

savvymapper's People

Watchers

Jude Mwenda avatar 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.