World Map to show User's location

I am trying to modify the World Map so when I am viewing the site, the map only shows what is in my area.

 

I found what I need to change and where, but can't figure out how.

 

In the /modules/boonex/world_map/templates/base/map.html, I changed the zoom: & center: and it works like I want. How do I insert the users Latitude & Longitude?

 

Where does Boonex grab the __map_lat__ &  __map_lng__ variables from???

 

BxWmapOnloadCallback__suffix__ = function () {

var mapOptions = {
scrollwheel: false,
draggable: (1 == __map_is_dragable__) ? true : false,
//zoom: __map_zoom__,
//center: new google.maps.LatLng(__map_lat__, __map_lng__),
zoom: 12,
center: new google.maps.LatLng(34.1615135, -118.3403506),
panControl: false,
overviewMapControl: (1 == __map_is_overview_control__ ? true : false),
overviewMapControlOptions: { opened: false },
disableDoubleClickZoom: false,
zoomControl: true,
zoomControlOptions: { style: google.maps.ZoomControlStyle.DEFAULT },
mapTypeControl: (1 == __map_is_type_control__ ? true : false),
mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DEFAULT },
scaleControl: (1 == __map_is_scale_control__ ? true : false),
mapTypeId: google.maps.MapTypeId.ROADMAP
}

Quote · 21 Jun 2014

Based on what I think you are trying to do you would want to plug in the coordinates of the currently logged in user.  You can get that from the bx_wmap_locations table.  

Quote · 22 Jun 2014

I found the data, the problem is that the file that draws the map is an HTML file.

I modified my .htaccess to parse HTML as PHP, but it does not parse the map.html as PHP.

My test page for parsing works, but not the /modules/boonex/world_map/templates/base/map.html file.

Quote · 22 Jun 2014

 

 

Where does Boonex grab the __map_lat__ &  __map_lng__ variables from???

Those are not variables but keys.  There is code to generate the keys; you insert the keys in template; the template parser then parses the keys to insert the values. 

Geeks, making the world a better place
Quote · 22 Jun 2014

Ok, would you know which page generates the keys? I can probably modify the SQL query there to pull the info that I am looking for.

 

Thanks

Quote · 23 Jun 2014

 

Ok, would you know which page generates the keys? I can probably modify the SQL query there to pull the info that I am looking for.

 

Thanks

 You need to get a programme that can search through files for a particular phrase, notepad++ or PsPad are two, I use PsPad.

The key is found in BxWmapModule.php.  I searched on map_lat and it is located on lines 499, 570, and 633.  Note: the keys will have the leading and trailing underscores but when searching excluded them; as with map_lat.

Geeks, making the world a better place
Quote · 24 Jun 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.