[map module] get via map menu styling trouble
dotnature
Joined: 2005-10-26
Posts: 224 |
Posted: Wed, 2006-02-01 20:14 | |||
my map size is embeded to fit nicely into well I geuss an embedded gallery, but when I use the "get via a map" it uses the default map size I set in options (right?) but the menu is not taken into account and breaks the page. I geuss there 2 possibilities to fix this, is it possible to set the "get via map" map to a differant size than the default one or can I move that menu somewhere else. See attachment for what I mean
|
||||
Posts: 1894
Well ... I see.
The Map you describe currently use the same size as the map define in your admin panel (assuming you are using 0.4.9 & up here) and will look like that
A way to hack it and make it using a different size is to open the MapHeader.tpl file (still assuming the version you are using is 0.4.9) and toward the top, you will see this:
If you are using the "%" for the map sizes instead of the pixels, you can change the value of interest minusW = 410 to a higher number and it would reduce the map size to smaller when "picking" coordinates.
If you are using the px sizes for the map, you would need
after
var myWidth = {$map.mapWidth};
to add the following line:
{if $map.mode eq "Pick"} myWidth = thesizeyouneedgoeshere; {/if}
If you want to get fancy and move the "menu" area somewhere else, you need to open ShowMap.tpl.
Then the display is done using a table: 1 TR with 2 TDs (TD 1 is the map, TD 2 is the Menu)
The Map TD is toward the top
Between {else} and {/if} is the definition of the table and the beginning of the first TD
The Menu TD is toward the bottom
If you're having trouble or are not using 0.4.9c let us know :D
-------------------------
The Termite
Posts: 224
hm ok well I ran into a problem I was going to try first method since seemed easy so I changed my map settings
for width and height from px to a % (74, 90) clicked save and fit fine but my default zoom level is messed up its shows same zoom level no matter what its set at (1-17) ( http://dotnature.com/index.php?option=com_gallery2&Itemid=38&g2_view=map.ShowMap&g2_Group= )<----this is set to lvl 17 zoom
clicking the auto zoom and center button does reposition it my 2 markers at a lvl 17 zoom yet it shows it more like at a lvl 10 zoom.
Posts: 1894
Well here is a new bug
What's happening is that I "assumed" (very wrong I was of course) that when you use the "%" feature you would use also the "AutoCenter and zoom" so...
since you're not, it basically "recalculate" the zoom for you anyway (since the size of the map is calculated dynamicaly it has too) and then doesn't autocenter (coz you actually didn't tell it too ...)
Bottom line you end-up with a map that is "Auto-zoomed" to the -best- level but doesn't center to the marker. That's not what we want really
So now a change needs to be done to the MapHeader.tpl to fix that
Try to change the line 91 from
{if $map.HeightFormat eq "%" or $map.WidthFormat eq "%"}
to
{if $map.AutoCenterZoom and ($map.HeightFormat eq "%" or $map.WidthFormat eq "%")}
Also need to make a change to ShowMap.inc around line 1041, change:
for
and let me know how it behaves
Thanks!
-------------------------
The Termite
Posts: 224
Sorry forgot to mention I was using 0.4.8e Ill update the module and then apply changes if needed.
*update
Been unable to get the latest version to work keep getting the following erros after activate
Posts: 1894
Did you check if the file was there at all ? MapAdminViewInit.inc in the includes folder ?
Let us know
-------------------------
The Termite
Posts: 224
yep its there I thought it was an updating problem so I then uninstalled it then deleted the entire module like 4 times, uploaded new one and same error everytime. I will download it again maybe it got corrupted.
* update
I realize the problem though not sure why it would happen, I have to use the /gallery2/ url to edit the admin for it to work
If I admin it from embedded mode it wont install. (using joomla)
After the install worked from gallery2 admin I still get errors and cannot admin it from embeded site url, which was not a problem in .4.8.e , im sure something changed in code that borked this. I would love if this worked as users wont be able to add phtos to the map.
Also on a non-related note with basic install with no features clicked I get some part of the legends text
, actually says "Lege" in ie and "Legend(s) in FF on far right of map http://dotnature.com/index.php?option=com_gallery2&Itemid=38&g2_view=map.ShowMap&g2_Group=
2 more bugs for you
Posts: 1894
Ok that's precisous info. It's most likely a problem with paths. I will have to check on that.
Can you post both bugs in the sourceforge so I don't forget I might not be able to work on it until this week-end
Thanks!
Posts: 224
Ok will do for some reason I can see no options to add to bugs or features on sourceforge, the only thing I can sumbit to is the submit new link and the catagories are none and interface(example) ?
Posts: 1894
I see your TEST bug thought ...
-------------------------
The Termite
Posts: 224
dog sorry figured it out so many adds I couldn't find the link