Title: Adding markers directly using shortcode?
Last modified: December 28, 2016

---

# Adding markers directly using shortcode?

 *  [mhann](https://wordpress.org/support/users/mhann/)
 * (@mhann)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/adding-markers-directly-using-shortcode/)
 * The shortcode API reference provides enough information for me to add a map to
   a page with a single marker included, like this:
 * [mapsmarker lat=”43.26010702″ lon=”-71.03199977″ mapwidth=”100″ mapwidthunit=”%”]
 * But if I add a second shortcode to the same page, with different values for lat
   and lon, it displays as a second map. Is there a way to add multiple markers 
   to a single map, using shortcodes? I ask because I want to generate a map from
   an array of location data in php, and manipulating the shortcodes seems like 
   it’d be the easiest way to do it

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/adding-markers-directly-using-shortcode/#post-8598292)
 * Hi,
    with that method you can currently only create single/marker maps – adding
   multiple markers to a map is currently not supported. This feature may be added
   with a future release, although other features are on the roadmap with a higher
   priority, so I cannot tell an exact release date. I would suggest having a look
   at the MapsMarker APIs instead, especially MMPAPI class, which could fit your
   needs – see details at mapsmarker.com/mapsmarker-api best, Robert
 *  Thread Starter [mhann](https://wordpress.org/support/users/mhann/)
 * (@mhann)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/adding-markers-directly-using-shortcode/#post-8600288)
 * Hi, thank you for the clarification.
 * [https://www.mapsmarker.com/wp-content/uploads/mmpapi/#add_markers](https://www.mapsmarker.com/wp-content/uploads/mmpapi/#add_markers)
   The MMPAPI class does seem like it will give me access to the functions I’ll 
   need.
 * So I’m trying to find the answer to this in the documentation, but I’m a bit 
   lost: If I use add_markers() with an array of data, which I think I’ll be able
   to do with my data, what do I do with the output to make it display on a page?
   The example provided ends with “$markers = MMPAPI::add_markers( $markers_data);”
   So what do I do with that $markers variable to actually get them onto a map?
 *  Thread Starter [mhann](https://wordpress.org/support/users/mhann/)
 * (@mhann)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/adding-markers-directly-using-shortcode/#post-8601611)
 * Never mind, I’ve made progress. Didn’t realize the marker functions were adding
   them directly to the database rather than holding them for an onscreen map
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/adding-markers-directly-using-shortcode/#post-8602299)
 * ok – if you have any further questions, let me know!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding markers directly using shortcode?’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/adding-markers-directly-using-shortcode/#post-8602299)
 * Status: not resolved