Active
Project:
See Map
Version:
5.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Jul 2007 at 03:48 UTC
Updated:
19 Sep 2007 at 06:59 UTC
I'm creating a CCK content type for a site I'm working on. I would like to use see map (great module for website usability btw) but the only way I can see to output the see map link to the screen is to output a whole location block. When I look at the sample node code on contemplate for my CCK content type this is what I see:
$node->field_see_map (array)
$node->field_see_map[0] (array)
$node->field_see_map[0]['show_see_map']
0
$node->field_see_map[0]['view']
and this:
$node->content['field_see_map'] (array)
$node->content['field_see_map']['#weight']
-1
$node->content['field_see_map']['#value']
$node->content['field_see_map']['#access'] (boolean)
TRUE
For whatever reason the html for the see map isn't showing up. I do know that the see map is doing something as I can see this:
See map: <a href="http://maps.google.com?q=100+N+University+Ave%2C+Provo%2C+UT%2C+84606%2C+us">Google Maps</a>
Is this a bug (or limitation) in see map or am I just missing some configuration option?
Any help is greatly appreciated.
Comments
Comment #1
sstacks commentedI had the same question you did and ended up bypassing the See Map module altogether.
Instead, I accessed the location_map_link_us_google function in location.us.inc (part of the Location module) to dynamically generate a Google Maps link.
Here is an example:
Comment #2
mariuss commentedComment #3
lias commentedJust to clarify about using the location snippet you did, do you mean you entered this in the contemplate body rather than this ?
print theme('location', $location);When I use
I get this:
http :// maps.google.com?q=411+S+Mill+Ave%2C+Tempe%2C+AZ%2C+85281%2C+us
displayed as text rather than a link (there's no space between the http and :// on the actual site, just here for display purposes. If this works I like it in some cases better thanthe default location display.
---- a question for the module maintainer, does the See Map module show all locations on one map for the user to "see" like what gmap allows you to do or does it just link to google maps?
Comment #4
mariuss commentedIt just links to mapping sites like google maps (all that are enabled).
Comment #5
mariuss commentedYou can certainly do that, but in many cases you don't need/want to create specific templates (either contemplate or in the theme folder).
Also, See Map does a few extra things for you:
- provides defaults
- if not enough address information was entered then it hides the links
- it can be disabled on a per node basis
- it can strip unit information from street address since this can confuse some mapping sites (actually it is a combination of mapping site and particular addresses that have this problem)
- it converts country and province (aka state) full names to codes (most mapping sites need codes)
One more thing, probably I need to clarify this in the documentation, See Map deals with ordinary fields, not with the special fields provided by the location module.