EasyUI Forum
September 13, 2025, 06:12:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Display Google Map in pop-up using datagrid row for co-ordinates  (Read 6183 times)
peter900
Newbie
*
Posts: 22


View Profile Email
« on: April 21, 2016, 03:06:52 AM »

This post http://www.jeasyui.com/forum/index.php?topic=1559.0  shows how to place a Google Map in a Tab.  It has fixed lat. and long. but it should be possible to pull this from a database and convert to JSON to display varying map positions.

The CRUD example illustrates how to  get data from a db, load the grid and then, via buttons, display the data in a pop-up form.

I'd like to mirror this with a Google map.  So the user selects a row and clicks a button Refresh Map - this passes the lat. and long. to the pop-up and so causes the map to refresh. The pop-up is non-modal so the user can switch between the form and the map.

Does this sound possible ?  Am I going in the right direction ?   Has anyone done this ?   Any help or suggestions much appreciated !
Logged
peter900
Newbie
*
Posts: 22


View Profile Email
« Reply #1 on: April 24, 2016, 03:04:06 PM »

I have a working version of this - see http://www.marionandpeter.com/XeroDev1/?page_id=97

This Google tutorial  https://developers.google.com/maps/articles/phpsqlsearch_v3 provided working code to generate the xml from a MySQL table holding lat and long data. This is displayed in a Data Grid for which the usual CRUD facilities are provided.  Selecting a row in the grid updates the map via Ajax.

It needs a bit of tidying up but the the grid, the data maintenance form and the map sit nicely in an iFrame on a Drupal web page.  There are Ajax pop-ups available in Drupal and in theory these can be linked to Drupal views but my present view is the easyui route is more straightforward.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!