Guest
22 Aug 2013 12:03

Hello,

I just purchased a subscription and I have a question. I need to show plots on a google map based on list results returned based on the search filters I provide. Is this possible? Please see the attached image.

Thanks in advance,

Matt

Last Modified: 02 Mar 2014


Sackgesicht VIP
Total posts: 1,636
27 Aug 2013 08:57

The get a marker, Cobalt needs the geographical coordinates (longitude, latitude) encoded into the Geo field.

As of now the CSV import does not support the geo field.

--> therefore, by importing some info from a CSV file, you will not get any marker on your map.

If you have only some records, you might consider manually encoding it through an additional GEO field in your TYPE.

Otherwise you might have to create an import script for it (even a sophisticated with geocoding/ reverse geocoding).

But it all depends on your source data ....


Sackgesicht VIP
Total posts: 1,636
27 Aug 2013 08:59

As you can see in your LIST MAP Template, you need to connect the list template to an existing GEO field in your TYPE in order to get the markers (records) from this TYPE displayed on the map ...


pepperstreet VIP
Total posts: 3,837
27 Aug 2013 10:43

The get a marker, Cobalt needs the geographical coordinates (longitude, latitude) encoded into the Geo field.

On submission form there is already an action "marker from address". I guess, in most cases I am going to import address data only. I mean, without long/lat values. If the button on submission already has the functionality for the current record... should't it be possible to create a batch tool of it? And place it in Cobalt tools area?

BTW, I mentioned this in another topic. Also nordmograph has an additional backend tool (11€). It is specifically for CB and JS profile fields... but why not modify it for Cobalts Geo field ?! ;-)


Sackgesicht VIP
Total posts: 1,636
27 Aug 2013 11:28

I guess, in most cases I am going to** import** address data only. I mean, without long/lat values

As far as i know, Cobalt IMPORT does not support the geo field as of now.

Maybe there is a misunderstanding. What i wanted to say is, that the geo fields needs longitude/latitude to display a marker on article full view or at the list view level. It can be through the address field (and then store the coordinates in the background) or through direct encoding (setting a marker or manually encode the coordinates).

**Bottom line here is, without coordinates, there is no marker display on a map ... **

If you import address data "only" without geocoding or the coordinates within your XML/CSV/JSON source data, you will never get a marker.

Please see here

Actually there was a long discussion before, how the field should do the geocoding/reverse geocoding based on entered address information.


Guest
27 Aug 2013 12:12

In a nutshell, this is what I need:

  1. Geo location is automatically calculated and records are show within a radius I specify with markers.

Now, is there a way to integrate the Google Map API into CB seamlessly? For instance,

params[address][city] = my field params city;


Sackgesicht VIP
Total posts: 1,636
27 Aug 2013 12:37
  1. Geo location is automatically calculated and records are show within a radius I specify with markers.

Please see my posting earlier ...

1) modify the map list template --> add current location detection (see example above)

How to modify a template

and

2) call the page with a predefined filter link (geo field) as explained above / docs here

Mandatory requirement to display marker:

Use Geo field to store the individual locations. Make sure every record has its maker.


Guest
27 Aug 2013 20:05

There is also something wrong with the pre filtered links. I have a field called "State" in my list which contains US states as strings "CA, NY" without the quotes. I used the following URL for a pre filter and it returned no results when I know for a fact, the state field has records with the state of CA

http://localhost/joomla?option=com_cobalt& ;task=records.filter&section_id=1&item_id=101&filter_name[0]=filter_k46fa0ebd6ccbb9ee27103d1a46b416d9&filter_val[0]=CA


Sackgesicht VIP
Total posts: 1,636
27 Aug 2013 20:54

Please check the prefilter documentation here

If the content of your field is "CA, NY" - the values need to be url encoded --> &filter_val[0]=CA,%20NY


Guest
27 Aug 2013 21:04

No, just one state at a time. Encoding not needed. I looked at the documentation.


Sackgesicht VIP
Total posts: 1,636
27 Aug 2013 21:57

To your link ...

assuming your Joomla installation is in the folder "joomla" then your link should be something like:

http://localhost/joomla /index.php?option=com_cobalt ....

The link you posted has the missing index.php

Powered by Cobalt