Hi Mark,
Yes the map works quite well in the CP. I did notice that I was running a slightly older version of the extension that actually worked slightly better in the CP, just a few small issues though on operation but nothing too bad. When I submit the entry it shows the lat and long co-ordinates but then that is about it. If I go to the single-entry template that I have set up for the entry then it just shows up the code and not the actual map.
Thanks.
Mark
Hi Mark,
Have tried that too before and it literally outputs what you have written to the page. You can see it in action (or perhaps not) here at this page.
http://www.markbowendesign.com/index.php/site/comments/photo_test_2
Any more ideas would be greatly appreciated as I would really like to get this all working. I’ve never had a problem with any of your extensions before so I’m not too sure what I must be doing wrong here.
Thanks.
Mark
Hi Mark,
Thanks for the update but unfortunately it still isn’t working. The map now works when I go to re-edit an entry but it still doesn’t work in the entry page.
Is there anything else I should be doing?
Thanks.
Mark
P.S. Just a quick question as I wanted to make sure that I have actually even read correctly as to what this extension does. I should be able to place a pin(s)? onto the map in the CP and then show the map on the entry page?
I just installed version 1.0.5 and it works, at least in the control panel. I haven’t tested elsewhere yet. But on the Admin Tab, when I select custom fields, then the field group that contains custom geo coordinates field, I get the following error
Notice: Undefined variable: field_type in /www/pmh4349/public_html/waubesa/cp/cp.publish_ad.php on line 7311
It just screw with that page of the control panel, and of course only happened once I switch the field type to geo corrdinates; but I couldn’t find any other mentions of the error under the latest version of geocoding. I do have a number of your other extensions running–in fact almost all of your various field types.
I have masked access to the control panel using a sub-domain.
Thus, I need two api keys: - one for admin.mysite.com (inside the CP) - another for mysite.com (the public site)
It would be great if there could be an option for two API keys, one for within the masked CP and another for the live site.
I tried doing this myself, but it’s beyond me.
For anyone else who comes across this problem, here’s how I fixed it:
About line 284 of ext.geo.php, I replaced this:
fetch_setting('google_key') ?>" type="text/javascript">
With this:
[removed]('<\/script>');
So it will disregard the key you put in the CP, and it will be hardcode, but it’s soles this particular problem. (Would still be better to have the extension use multiple keys though).
For anyone else who comes across this problem, here’s how I fixed it:
About line 284 of ext.geo.php, I replaced this:
<script src="http://maps.google.com/maps?file=api&v=2.58&key=<?php echo $this->fetch_setting('google_key') ?>" type="text/javascript"></script>
With this:
<script type="text/javascript"> document[dot]write(
'<script src="http://maps.google.com/maps?file=api&v=2.58&key=' +
{
'mysite.com': 'google_api_key_1',
'subdomain1.mysite.com': 'google_api_key_2',
'subdomain2.mysite.com': 'google_api_key_3'
}[location.host] +
'" type="text/javascript"><\/script>' );
</script>
Replace the [dot] above, with an actual dot/period(.)
So it will disregard the key you put in the CP, and it will be hardcoded, but it’s solves this particular problem. (Would still be better to have the extension use multiple keys though).
@Mark Bowen - I found some good documentation for integrating and customizing my maps here:
http://www.google.com/apis/maps/documentation/#The_Hello_World_of_Google_Maps
And if this helps, in the HEAD of my page I’ve combined EE code with Google’s JS like this:
map.setCenter(new GLatLng({exp:weblog:entries limit="1" dynamic="on" rdf="off"}{office_location_raw}{latitude}, {longitude}{/office_location_raw}{/exp:weblog:entries}), 13);
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.