Hi vibe9.
Yes I’ve seen that link before but thanks for reminding me of it. I will have to look back at that page again when I get more time to figure it all out. Unfortunately I have a lot of things going on at the moment and getting my head around another item will most likely make it explode so I am being a little careful!! 😊
Thanks for the link though.
Best wishes,
Mark
I have been using Google maps with manually entered coordinates into custom fields, but I am so exited about the possibilities with this extension.
Something I want to do is add a link to a full window on Googlemaps, I have the link code that works (opens a new window with a marker and adds the entry Title to the pop-up box):
<a href="http://maps.google.co.uk/maps?f=q&hl=en&geocode=&q={mapref_raw}{latitude},{longitude}{/mapref_raw}({title})&ie=UTF8&z=12&iwloc=addr&om=1">
But it doesn’t work if you want to have a map displayed as well. The link works but the code to display the map just shows up in the browser as text and no map. It seems that you can’t have two calls for the same data. Any solutions?
Also any news on being able to have the map type choice saved when you Publish?
I have noticed another issue that may be a Firefox problem as it works OK in IE7.
If you set the field to show by default to NO, then when you open the field in the publish page the map does not render properly. It doesn’t fill the box and is a bit erratic when dragging.
Yet another lover of this extension here. I’ve poured over the thread a couple times but I’m getting hung up in one place:
I really just want to output the lat/long coordinates and what I get is a map and unparsed EE code, check it out:
http://www.iloveoldtown.org/test/businesses/type/Apparel/Grace/
Another lurking fan who’s finally come out of the closet….
Was wondering if anyone could suggest how I could replace the default GLargeMapControl() constructor with the tidier GSmallMapControl() in the GControl object.
I’m no JS expert so I was hoping that the container div for the constructor would have a class hook that I could easily operate on via css. Unfortunately it’s a nameless element. So it seems like I have to get (someone else) dirty with the DOM to pass and replace the offender.
Any ideas on how I may approach the issue?
Well done Mark and thanks indeed!!
One thing I found while using this is that for google maps in general, make sure that your CSS does not apply a background color to all images, e.g.
img {background-color: #888;}
if you do, then the map marker almost disapears, just leaving its shadow, and the controls no longer have a transparent background.
I’ve not seen this mentioned elsewhere, but have not looked really hard either - still this may save some headaches.
if your maps are held in a div with an id, say, googlemaps, then you can workaround this using the following in your CSS file:
#googlemaps img{background-color:transparent;}
@sneers: I just replaced that control myself. About line 568 (in the extension file, ext.geo.php), change:
$map.= 'map.addControl(new GLargeMapControl());'."\r";
to:
$map.= 'map.addControl(new GSmallMapControl());'."\r";
Then, on the next line down (this is optional…), I added this line:
$map.= 'map.addControl(new GMapTypeControl());'."\r";
and now the little controls show up in the upper right: Map/Satellite/Hybrid.
@mdesign
Brilliant, but how strange and coincidental. I only just found it myself literally a few minutes ago before checking the thread and your helpful reply. Seems I’m not receiving updates from this post.
Now I’ve got another head scratcher: my maps aren’t displaying. And it’s not as a result of the teeny modification to the GSmallMapControl switch. It broke prior to the tweak. On the surface everything seems to be working: the extension displays in the publish page, the {longitude}{latitude} _raw data gets displayed on the frontend. Looking at the generated source html I see that the crucial initial script with the key
src="http://maps.google.com/maps?file=api&v=2&key=..."
is no longer being generated.
What could I have broken? I’ve recently modified the mod.weblog.php file to make Mark’s other wonderful Multi-Relationship ext work.
Update: I’ve just tested the mod.weblog.php file and he’s not the problem.
I’ve solved the problem with wanting to reference the map twice in a page.
I wanted a hyperlink to another map service and to show the Google map. You need to have each request within its own weblog entries tag. “mapref” is the name of my field that stores the data.
{exp:weblog:entries weblog="{my_weblog}" limit="1}
{mapref width="640px" height="300px"}
{/exp:weblog:entries}
For example this is the code to link to Microsoft’s Live maps:
{exp:weblog:entries weblog="{my_weblog}" limit="1}
<a href="http://local.live.com/default.aspx?v=2&cp;={mapref_raw}{latitude}{/mapref_raw}~{mapref_raw}{longitude}{/mapref_raw}&style=h&lvl=15"> MS Live maps</a>
{/exp:weblog:entries}
You can use the _raw links several times within one weblog tag, but the standalone map link must be in a separate one. You can see it working here.
Hello,
after experiencing some problems when using this plugin inline, I’d like to create a link to google maps or maybe use some lightbox script. I understand that in need to pass all the necessary parameters to the script or google maps window. what I was wondering whether there is a way to use this
{office_location_raw} {latitude}, {longitude} {/office_location_raw}
but also get the zoom and maybe user api code.
maybe somebody has already done this using prototype or mootools and would share the way he/she did it.
the problem I experienced when showing the google map in the content was that the page looses the css info for a second or two.
thank you in advance for your help.
Hi there,
I definitely don’t want to take away the thunder from Marks work here as he is fantastic at what he does but I had to go looking for another option as I just could not get this to work no matter what I did and was just wondering if anyone had ever come across Phoogle Maps before?
I have used this and it seems to work very well. It also means that if you have clients typing in the address then they don’t have to find out the Lat / Long co-ordinates first which is a great boon!
Perhaps Mark could roll this kind of API into his work here?
Best wishes,
Mark
Hello, after experiencing some problems when using this plugin inline, I’d like to create a link to google maps or maybe use some lightbox script. I understand that in need to pass all the necessary parameters to the script or google maps window. what I was wondering whether there is a way to use thisbut also get the zoom and maybe user api code. maybe somebody has already done this using prototype or mootools and would share the way he/she did it. the problem I experienced when showing the google map in the content was that the page looses the css info for a second or two. thank you in advance for your help.{office_location_raw} {latitude}, {longitude} {/office_location_raw}
Edit: was just wondering whether anybody already has an idea what’s causing the CSS issues I’m experiencing.
Thanks again
Mark, If you are interested i can send you a few updates i added 1: map loads Using the Google AJAX API Loader 2: added Terrain Map type 3: Mouse Wheel zoom in and out 4: Double Click zoom in and out 5: mouse over Show/Hide Map Type Control
same changes added to the CP Map as well
IE6 seems to have issues with the map.addOverlay() function but that is API wide not just on this script
I’m having some trouble with the default output on the template, probably because I’m outputting the map into a tab in a set of tabs. I still need to do a little testing, but I was wondering how easy it would be to get the other variables out of the extension, like this:
{office_location_raw}
{latitude}
{longitude}
{api_key}
{zoom}
{default_zoom}
{marker_lat}
{marker_long}
{/office_location_raw}
or something like this. I feel like the code that is being output in the middle of the template (I’m somewhat of a Javascript-keep-it-outta-my-template purist) might be screwing with the tabs, so the whole map isn’t showing (I’m using jQuery). What I’m ultimately trying to do is feed the map and marker info to the jQuery googlemaps plugin to keep all the JS out of the markup.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.