Google map plugin, "Always Show map" not working

verzevoul

Member
Hi,

i' m using google map plugin on the following website:

http://88.198.83.58/~vip/map/

I'm using a filter above google map to search for some predefined locations on the map. The problem is that if i search for a different location beside the ones i' ve created, the result is an empty map. Nothing inside, just a "grey" color. then if i clear the search field the map comes back like it was. I've noticed a setting in "Visualization" tab that says: "Always Show" (Always show the map, even if there are no data points, or required filters are not set). I have set this to "YES" but, still not getting anything...

You can for example search for "mykonos" or "kea" and see how it works. but if you search for example "crete" or something else that is not pre defined, you'll get NOTHING. There is also another problem with the encoding: Whenever i'm using Greek characters in the search field i get an error about the database and crashes the whole website (getData:Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='). For example you can use "???????" or "?????".

Thanks in advance,
 
hi - for the encoding ensure that your tables have a collation of uft_general_ci (you can alter those in phpmyadmin if needed).
Otherwise I'm not sure about the map viz, my fabrik 3.0 map viz doesn't behave in the same manner. I tried logging in to your site's administration section but the username and password doesn't work. Could you check those, then I can log in an see if there is a difference between my set up and yours

-Rob
 
I looked at the front end viz, but I don't see how to enter the examples you gave that failed, as everything on the filter dropdown seems to exist.

-- hugh
 
ok, now i changed it back to "field" so you can enter the examples i mentioned before.

Now there is another thing that i wanna do: when you go at http://88.198.83.58/~vip/map/index.php?option=com_fabrik&view=form&formid=38&Itemid=444&lang=el

in this section you'll see how i can add a new boat.

In the first field you add the region (???????) of the boat.
In the second field you're getting the coordinates (?????????????) of the boat according to the map.
Then you enter the boat's name (????? ??????? ) and the last field (????? ???????) is a drop down field with 2 predefined values: big (??????) and small (?????).

Now i need to use a different icon when someone selects "big" and a different icon when someone selects "small". i.e. a big boat icon in the first case and a small boat icon in the second case, then when you hit the save button you must see in the map different icons for small and big boats.

*the icon that i' m using right now is common for these two options (it's a black boat, you can see it in the map).

i can't find an option to select a different icon. So, please let me know, how could i do that.
 
NOTE - I've turned off the AJAX refresh feature for now, and am enabling "Debug JS" under the main Fabrik options so I can see the un-compressed JavaScript.

The AJAX refresh is actually crashing my Firefox on the second 10 second update, which is making debugging a little hard!

(Just some notes for myself, so I remember to re-apply those things when I'm done)

-- hugh
 
I think this is to do with where we try and center the map. Looks like we didn't anticipate a situation where none of the centering methods would return a valid center. With no actual data points, "middle" returns a null result, as does "last added", etc.

I'm working on how to best approach this. I think the only solution is to do what we do with the map element, and let you specify a lat/lon to use if there is no data, and "middle" or "last added" are selected (as opposed to "user's location"). I'm guessing you still want the map to open in that region of the Med, even if there's no data to show. But if there's no data, we have no way of knowing where in the world you want your map to center.

-- hugh
 
Hugh,

i want the map to open in that region of the Med (GREECE), even if there's no data to show.

can you do that? have you checked the other issue with the icons? big and small icons?

Chris
 
I can only work one issue at a time. Yes, we can do that, I just started on coding that option up, so the viz settings will have a default lat and lon we can fall back to if no data to show. Once I get that done, I'll look at the next issue.

-- hugh
 
Can you check your ftp details? I need to upload some changes to test, and none of the ftp logins I have work for the 'map' site.

The one I have for the 'logistics' site works, but I can't get at the 'map' site from that.

-- hugh
 
Hugh,

i've just updated the FTP details for the 'map' site, so you can do your tests. Is it also possible to show an info text that will inform the customer that the region he's asking for doesn't exist? Just an info pop up or something like that... And we can show Greece's map in the background.

Nevertheless, i' d like to know if it's possible to give priority to the 'icons' issue before doing that with the "empty map"?

Thanks in advance,

Chris
 
I think you should be able to do that with the "Data Icon" setting, which lets you specify an element to use which has the image you want to use for the marker in it. Which is exactly what you need.

Only one little hitch, which is the current the code assumes that'll be an 'image' element, so it expects the path to contain an actual <img src="..."> tag in it. But I can tweak that code a little, so it'll also work with just a simple/path/to/image.png, relative to your J! root. Then you could set the values for that Small / Big dropdown to be the /path/to/big_boat.png and /path/to/small_boat.png.

You could make that dropdown be an image element, with front end select enabled, but that wouldn't have the simplicity of just a simple dropdown.

Anyway ... it's coming up 5am, time I got some sleep. I'll make that change in the map viz tomorrow, and we can try the dropdown value approach.

-- hugh
 
The ftp credentials you gave me for the map site open in to an empty folder, not the map site.

Let me know when that's fixed.

-- hugh
 
OK, I'll take a look tomorrow. 5:30am, time for bed.

I've made the changes locally which should allow us to fairly easily set the icon image, I just need to get the changes ftp'ed up to your site, and test setting that size dropdown to specify the paths to the images.

-- hugh
 
Doing it now.

BTW, do you use that big / small dropdown for anything else? The values are currently 1 and 2 ... which I was going to replacewith the path to the icon you want to use.

However, it occured to me that you very probably use those 1 and 2 values elsewhere. So I'll create a hidden element for the icon path, and add a little PHP submission plugin to set the hidden path variable accordingly when the form is submitted.

--hugh
 
OK, should be working now.

I added a hidden element called boat_icon, and a small PHP plugin on the form that sets that element to the required path, depending on the selection on the 'boatgenre'.

All you have to do is create an icon in ./media/com_fabrik/images whicih matches the value of the 'boatgenre', appendd to boat_. So for a select value of 1, you need boat_1.png. For 2, boat_2.png. You won't have to modify that PHP form submission script, as it just takes the value of the genre dropdown, and automatically creates the required path from that value.

And you should be able to add or change those genre selection values, and as long as you have a matching boat_whatever.png in the media folder, it'll get used.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top