Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Marker data in google maps 07 Aug 2016 15:42 #14367

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
I am using your code for a list of markers in a map.. here is my version (api removed)
<div>
        <?php echo JDom::_('html.fly.map.google', array(

            'keyAPI' => 'xxxxx',

            'markers' => array(

                'fitBounds' => true,

                // Set the markers datas from a list
                'list' => $this->items,

                'dataKeys' => array(
                    'lat' => 'lat',
                    'lng' => 'lng',

                    // Search by name, or address, when the coordinate are missing or empty
                    'address' => '{name} {postcode}',

                    // Set the marker title
                    'title' => '{name}',

                    // Template Description
                    'content' => '<span style="font-size:16px;">{summary}</span>'
                ),
            ),

        )); ?>
    </div>

The markers are all showing correctly (so model is pulling data) , but the content in {name} etc are just blank
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

Please Log in or Create an account to join the conversation.

Marker data in google maps 07 Aug 2016 16:25 #14369

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Did you included 'name' in the SELECT of your query ?
Because this is not automatic. JDom can only use the values, but does not create the SQL according to its needs such as an ORM.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Marker data in google maps 07 Aug 2016 16:35 #14373

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
Ah found it

I did have a.summary missing in the model.. now added and content is OK

Also, if I put {name} in the content it renders.. it looks like the TITLE part of the JDOM is not rendering i.e
// Set the marker title
                    'title' => '{name}',

is empty when I render content. I dont think you use it in your example as you create a layout for your box
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

Please Log in or Create an account to join the conversation.

Marker data in google maps 09 Aug 2016 11:09 #14403

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
What do you mean ?
It works for me.

'title', 'content', 'address' are parsing the {tags} without problem.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.088 seconds

Les générateurs de code je les connais presque tous pour les avoir essorés en long en large et en travers ... mais celui ci c'est vraiment un outil formidable de simplicité et d'efficacité !
Marc. (liubov - Forum)

Get Started