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.063 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started