vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   VBGooglemap Member Edition (https://vborg.vbsupport.ru/showthread.php?t=99920)

pooslokka 11-19-2008 01:57 PM

Thank you just installed Great pluging cheers.
i have few problems.
i feed very had to go each post in this thread and find my question has been answered or not.

My qestion is :

1. I want the White Tool Tip like stuff that contain the user location information auto appear insted of on clicd on the marker. coz it confuses.

2. is there a way to limit the size of the picture allowed?

Marked as install and nominated :thumb:

lpetrich 11-19-2008 04:30 PM

To make the info bubbles only appear when clicking on a marker, go to

Admin CP > Vbgooglemap ME > ME Settings > Enable the mouseover support on the markers?

For setting the maximum size of an image, one would have to edit product-vbgooglemapme.xml

Line 550:
var content2 = "<img width=\"$gmimagemax\" border=\"0\" src=\""+pimage+"\"></a>";

I'm thinking of something like
var content2 = "<img style=\"max-width: $gmimagemax; max-height: $gmimagemax\" border=\"0\" src=\""+pimage+"\"></a>";

The picture will get displayed, but would get shrunken in both dimensions to fit a maximum-dimension square. That dimension is set in ME Settings as

Default width for the balloon on marker

And after editing product-vbgooglemapme.xml be sure to reinstall it.


For some additional fixes, do some more editing of product-vbgooglemapme.xml:

To make mousing over only show the username, change:

Line 550:
var marker = new GMarker(point, icon);
to
var marker = new GMarker(point, {icon:icon, title:username});

BTW, the former syntax for the GMarker constructor is now deprecated. What I substituted for "icon" is a GMarkerOptions object, which is a JavaScript property list.

To enable mousewheel zooming and terrain display, add these lines:

map.enableScrollWheelZoom();
map.addMapType(G_PHYSICAL_MAP);

after the following lines:

Line 598:
map = new GMap2(document.getElementById("memap"),$map_type);
Line 855:
map = new GMap2(document.getElementById("mapme"),$map_type);
Line 1129:
map = new GMap2(document.getElementById("mapme"),$map_type);

Fix of marker appearance in edit mode:

Line 863:
map.addOverlay(new GMarker(point, icon));
to
map.addOverlay(new GMarker(point, {icon:icon}));

Line 877:
map.addOverlay(new GMarker(point));
to
map.addOverlay(new GMarker(point, {icon:icon}));

Fix of marker position on map:

Change all occurrences of

icon.iconAnchor = new GLatLng(...);
icon.infoWindowAnchor = new GLatLng(...);


to

icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(8, 1);


Coordinates are left-to-right, top-to-bottom.

There are several improvements that I didn't bother to try to make:
  • Adding a "terrain" option to the possible default views (may require hunting through several files)
  • Adding draggability in edit mode
  • Making edit-mode recentering optional
But if you people are interested, I could try to make them.

To add draggability you set draggable:true in the marker's options, then set up a GEvent listener that gets the "moveend" event and updates the displayed position accordingly. The reason that it was not originally present was because vbGoogleMap had originally been coded for an older version of the Google Map API that had lacked this and several other convenient features.

lpetrich 11-20-2008 12:59 AM

I've gone ahead and implemented this fix:

Centers an image in the info balloon's "Image" tab. If the image is larger than the maximum allowed size in either direction, then it will be rescaled to fit.

In product-vbgooglemapme.xml

Line 550:
var content2 = "<img width=\"$gmimagemax\" border=\"0\" src=\""+pimage+"\"></a>";
to
var content2 = "<img style=\"max-width: {$gmimagemax}px; max-height: {$gmimagemax}px; display: block; text-align: center; margin: auto; vertical-align:middle\" src=\""+pimage+"\">";

-

I've also tracked down the code for selecting the default map type; I will be posting it when I implement it.

lpetrich 11-20-2008 01:34 AM

Fix: added the ability to choose "Terrain" as a default map type:


In vbgooglemapme_admin.php

After line 39:
'3' => 'Satellite',
add
'4' => 'Terrain',


In vbgooglemapme.php

After line 73,
change
if ($maptype == 1)
{
$map_type = "{mapTypes:[G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]}";
}
...
}

to
switch ($maptype) {
case 1:
$map_type = "G_NORMAL_MAP";
break;
case 2:
$map_type = "G_HYBRID_MAP";
break;
case 3:
$map_type = "G_SATELLITE_MAP";
break;
case 4:
$map_type = "G_PHYSICAL_MAP";
break;
}



In product-vbgooglemapme.xml

change
map = new GMap2(document.getElementById("mapme"),$map_type);
to
map = new GMap2(document.getElementById("mapme"));
and likewise for "memap" instead of "mapme".

After
map.addMapType(G_PHYSICAL_MAP);
add
map.setMapType($map_type);


I'd earlier described my terrain fix, which involves adding the line
map.addMapType(G_PHYSICAL_MAP);
after each instance of
map = new GMap2(...);

pooslokka 11-20-2008 04:36 AM

Quote:

To make the info bubbles only appear when clicking on a marker, go to
thank you for your kind reply. but i just want the bubbles to appear on loading without need to click.

i can now see this are in the vbgooglemap.php file


Code:

if ($mouseoversupport == 0)
{

                $getlistenerinformation = "
                GEvent.addListener(marker, \"click\", function() {
                marker.openInfoWindowTabsHtml(infoTabs);
            id = document.getElementById('username');
            id.innerHTML = username;

                  });
                ";
                 
}
if ($mouseoversupport == 1)       
{         
          $getlistenerinformation = "
          GEvent.addListener(marker,\"mouseover\", function() {
          marker.openInfoWindowTabsHtml(infoTabs);
                  document.getElementById('username').value= username;
            id = document.getElementById('username');
            id.innerHTML = username;

        });
          ";       
 
}


lpetrich 11-20-2008 06:14 AM

Quote:

Originally Posted by pooslokka (Post 1669144)
thank you for your kind reply. but i just want the bubbles to appear on loading without need to click.

I'm getting confused. Are you wanting the info bubbles to always be visible?

That is, without needing to mouse over or click on their markers. The AdminCP option I'd referred to earlier was for setting mouseover vs. clicking.

As far as can tell from the Google Maps API reference and elsewhere on "info windows", there is only one info-bubble object per map, but one that vbGoogleMap revises each time one mouses over or clicks on a marker. So it does not seem possible to display several info bubbles at once.

pooslokka 11-20-2008 07:51 AM

yes yes, always be visible :D
When load, the bubble also should appear. then the viewer can close it if he want.

pooslokka 11-20-2008 09:03 AM

http://img444.imageshack.us/img444/7640/pscxg9.jpg

when you click show on map, that users bubble should appear on load. but what i see is it shows all the users marks and hard to find the one that relevant to the user in that raw.

pooslokka 11-25-2008 10:35 AM

pls help !

http://img300.imageshack.us/img300/8794/pscim6.jpg

i want to add in the "Map" word that link to each users map location now we have in table.
how can i do that?

Edited :

I added a link to the Post Bit and try to use the url. but the cordinates are not retrived for earch user. the post is empty :(

Code:

<a href="$bburl/vbgooglemapme.php?lat=$getinfo_me_list[lat_map]&lng=$getinfo_me_list[lng_map]&zoom=$linkzoomlevel" target="_self">$vbphrase[vbgooglemapme_map_link]</a>

gamma912 11-28-2008 10:04 AM

I would like to use this so that my members can upload photos and chart them on the map - and then other users can see the photos and where they were taken - is it possible with this MOD?


All times are GMT. The time now is 06:32 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02784 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete