🗺️
Mapster WP Maps
HomeProExamplesContact
  • Getting Started
    • About
    • Installation
    • Key Concepts
    • Importing/Exporting
    • Guides
      • Your First Map
      • Creating a Crowdsourced Map
      • Set Up Recurring Import
      • Adding a Custom Style
      • Building a Custom Popup
  • Creating Shapes
  • Displaying Maps
  • Maps
    • Map Tiles
    • Initial View
      • Fit to Features
      • Manual Values
      • User Location
    • Map Size
    • Points, Lines, Polygons
    • Clustering
    • Interactivity
    • Controls
      • Basic Controls
      • Geocoding & Geolocation
      • Togglers
      • Other Controls
      • Control Render Order
    • Filters
      • Category Filter
      • Custom Search Filter
      • Filter Dropdown
    • Lists
      • Store Locator
    • Specialty Maps
      • Map Comparer
      • Heatmaps
      • Elevation Profile
      • User Submission
      • Listing Page Map
    • Preloader
    • Developer
      • Javascript
      • Embedding Maps
      • Faster Loading (Cache)
      • Caching
      • Progressive Loading
  • Locations
    • Markers
    • Circles
    • Labels
    • Icons
    • 3D Models
  • Lines
    • Lines
  • Multi Lines
  • Polygons
    • Flat Polygons
    • 3D Polygons
    • Image Polygons
  • Multi Polygons
  • Popups
    • Popup Templates
      • Introduction
      • Layout, Colors, Text, CSS
      • HTML
      • Options
    • Popup Content
  • Pro Sections
    • User Submission
      • Overview
      • Submission Interface
      • Adding Custom Fields
      • Submission Admin
  • Mass Edit
  • Settings
    • General
    • Account Management
  • Advanced
  • Import
  • Tileset Management
  • Developer
    • Mapster Map ACF Field
    • Mapster Map Gravity Forms Field
    • Custom Scripts
    • Hooks
    • Spatial DB & API
    • Internationalization
Powered by GitBook
On this page

Was this helpful?

  1. Developer

Mapster Map ACF Field

Use Mapster to help build custom post types with geographic information stored appropriately and usable with the rest of the Mapster plugin.

PreviousTileset ManagementNextMapster Map Gravity Forms Field

Last updated 26 days ago

Was this helpful?

If you want to use Mapster to store geographic information, or even attach geographic information to your own custom post types and then display them using the Mapster plugin, you can do that!

First, you have to install (the free version is fine). Once you do, if you are creating your custom fields, just look for the Mapster Map field type.

This will create a geographic editing field just like the one you see in the Mapster plugin:

You must select a single Geography Type (Point, Line, or Polygon).

If you don't select Styling, then that means you will just be storing geographic information. When getting this information out from ACF using ACF functions, the information will be stored as a GeoJSON. Just parse it as an object and you will be able to load it into any normal GIS system or other map.

If you plan to add your geographies to a Mapster Map, you will at least need to add Styling. Otherwise, the map won't know how your point should look. Only leave Styling off if you're planning to save purely geographic information for your own use.

If you do select Styling, then you'll be able to set all the options in the same way you can set them in the equivalent Mapster post type (Point, Line, or Polygon). This creates a ton of freedom to style your geographies wherever you want.

If you also want to customize Popups this way, just turn the Popups option on as well.

Adding to a Mapster Map

Once you've created your custom geographies on your custom post types, you can add them to any map you've created with Mapster. Open your map, then go to the Points, Lines, Polygons tab. There, scroll down and you will see a field for Add Custom Posts. Here, select the specific posts from your custom post type that you want to add, and presto! They will appear on your map.

Advanced Custom Fields
This is an example of the "Point" type.