The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Google Maps - Hot Spots - Events for vbaCMPS Details »» | |||||||||||||||||||||||||||
Google Maps - Hot Spots - Events for vbaCMPS
Developer Last Online: Jun 2013
This is my first contribute to everyone here so if you could click install so that i further add to this.
Here is a LIVE working demo. minus the added pictures and colored markers which is an addiontal install. Insutructions listed below. http://www.jerseyparties.com/index.php?page=googlemap Im using this with vb 3.5.1 and vbadvanced cmps 2.1 Google Maps with Hot Spots - Events for CMPS ******** You will need your own Google API Map Key for this to work. You can get it by going here:http://www.google.com/apis/maps/signup.html ***Install: Add a module as you normally would, and copy the below into the template content. To create a module vBa CMPS > add module > template > then give it any title you want and display order Then give it a name I called my "googlemaps" so the name is now "adv_portal_googlemaps" ******** note google maps do slow down load times ********* Copy the below and place it into the template content. After you have your Google API Map Key enter it where it says "Enter_Your_Key_Here " Should be around line 7 or so. PHP Code:
Ive been using this site to convert an address to the proper latitude and longitude. http://stevemorse.org/jcal/latlon.php - for US locations http://www.geocoder.ca/ - for Canadian locations Adding Different color markers. If you want to add different color markers, line 10 should read: PHP Code:
PHP Code:
Then after you have added that you will need to add this: This will have to be added for each marker you add. Add this right below the first marker. Should be around line 46 or so. PHP Code:
Each time you want to use a different marker you have to call to that variable/marker. So in the example I have: PHP Code:
PHP Code:
You can add image to the pop up windows as well. See picture attached. In a call to variable where it says: PHP Code:
PHP Code:
PHP Code:
To add this to its own CMPS Page Follow these directions and skip number 7, because I set this up as a template file and not a php file. http://www.vbadvanced.com/membersare...tid=4&pageid=6 Then whatever you called your page in the immediate above directions from vbA under "page identified" ( i used googlemap ) edit your navbar and inclue to a link to that page. Mine is PHP Code:
*** added screen shots *** First shows the installed look. Second picture shows the popup window when a marker is clicked Third shows the addiontal useage of colored markers. Code is listed above but not in the orginal install. Fourth Picture shows the popup window with added images. How to is listed above but not in the orginal install. Show Your Support
|
Comments |
#42
|
|||
|
|||
I would like to implement some form of googlemaps on my site which would be used to display locations of known radar traps that police setup, or photo radar locations etc....
living in Canada I'm having a difficult time getting the lat and long of locations. I thought I was playing around with googlemaps before and found a way to indicate the lat/long as you moved your cursor over the map. Just looking for some suggestions you might have? |
#43
|
|||
|
|||
Quote:
This should work for canda. http://geocoder.ca/ |
#44
|
|||
|
|||
How can you adjust the size of the map dynamically if possible? My site is based around 1024x768, but I personally use 1200x1600. How can I make the sizing the best for both worlds, or prefereable the 1024x768. Also are we able to get access anywhere to google map files? Perhaps images that google uses for markers etc....I've found some here and there, but just wondering if there is somewhere that indexes them?
I don't even see where to adjust the width of the map. |
#45
|
|||
|
|||
Hey froggy - At the bottom of the coding it says:
"<BODY> // i have this set up for height only add the width if you want. <DIV id="map" STYLE="height:600px"></DIV> </BODY> " change the height to whatever you want and add the width. Also Im not sure of where to get the markers. You can make your own and pull them from your server, just edit the icon0.image = "http://www.google.com/mapfiles/marker.png"; icon0.shadow = "http://www.google.com/mapfiles/shadow50.png"; url for those. |
#46
|
|||
|
|||
Updated the Live Demo Link.
|
#47
|
|||
|
|||
When I attempt to add a 4th marker the map doesnt load for some reason.. I copied and pasted everything exactly the same.. I got 3 to work fine, but when I go to add the 4th it wont load.. any ideas?
Please PM me, thanks.. |
#48
|
|||
|
|||
Quote:
find PHP Code:
PHP Code:
see where it says PHP Code:
PHP Code:
PHP Code:
PHP Code:
the rest PHP Code:
|
#49
|
|||
|
|||
i did that and its still not working
|
#50
|
|||
|
|||
post your coding please
|
#51
|
|||
|
|||
Hi Kev,
Would this code work with 3.6.0 ? Thanks, Patrick |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|