graphxks VIP
Total posts: 68
11 Jul 2014 17:43

I have separate cobalt Types, assets and overlays, that I need to display on my Collection map.

So far we have been working with the assets, so the map on the Collection page is displaying all the assets that are children of that Collection.

http://new.michiganwatertrails.org/index.php?option=com_cobalt& ;view=record&id=15:lake-michigan-water-trail-northwest&Itemid=161

On this map I also need to display google map engine overlays or KML file overlays that are also related to the Collection.

These have very different type form fields, causing me to create another cobalt Type for them. But how do I display two child types of one parent Collection?

Last Modified: 23 Jul 2014


graphxks VIP
Total posts: 68
11 Jul 2014 19:34

Is there a way geo can build a map entity display array out of multiple child field sets? or can custom, local overlays be added like the google maps traffic and weather layers?


Sergey
Total posts: 13,748
13 Jul 2014 12:22

graphxks or can custom, local overlays be added like the google maps traffic and weather layers?

Yes you can add it but you need to edit map template and custom add it.


graphxks VIP
Total posts: 68
13 Jul 2014 13:33

Is there a way to display them along with the other Asset children? (So again, displaying two seperate groups, assets and overlays)?
There are currently 28 different overlays for different locations and more may be added in the future.


Sergey
Total posts: 13,748
14 Jul 2014 01:00

With custom coding you maty do whatever you what.

As I understand the source of your overlays is KML files. So the only way to load them is from javascript API in map template.


graphxks VIP
Total posts: 68
14 Jul 2014 02:03

Ok. So there is no way to do it with parent/child like with the Assets?


Sergey
Total posts: 13,748
14 Jul 2014 05:00

I cannot really tell you because I still do not understand what you need clearly.


graphxks VIP
Total posts: 68
14 Jul 2014 10:41

Ok,

I am displaying maps of collections, which contain assets (Locations) and at least one overlay (a trail, which may be a google map engine layer) and possibly several KML files.

The overlays have a different set of form elements then the assets (file location, no address or phone, etc.)

So my first thought was to make them a child of the parent collection, just like with the assets. But I don't know how to display two child sets on the same map.

Or... is there a way to have different form elements for different types of the same "type". Maybe by Section/Category? Then locations and overlays could all be assets, but selecting their sub-type could bring up a different list of form elements for entry?

The goal is to get both the locations and the overlays to display on the same map.

See attached, showing both assets (historic markers) and overlays (the trail overlay, and corp of engineers shoreline photos overlay)

Screen Shot 2014-07-14 at 6.30.11 AM


graphxks VIP
Total posts: 68
15 Jul 2014 16:37

Hi Sergey,

The above is from a custom system that we are replacing. This map above is what I am trying to replicate with Cobalt. So far, we have made a Parent/Child relationship where the parent (Collection) map shows all of the children (Assets).

In the above image, the square blue icons are each an Asset (location). There could be several hundred of these, of up to 47 different Asset types, per Collection.

The blue outline around the island is a Trail (which will be a map engine layer).

The series of orange dots is from a KML file.

So there is currently a parent child relationship between the Collection and the Assets, which works great. But on the same map I need to also show the relevant KML file(s) associated with that Collection, and the Trail Map (which is one consistent, map engine layer).

It's the KML files and trail map that I am not sure how to integrate. Making them an Asset (child) of the Collection (parent) seems logical, but the entry and edit forms are completely different (i.e. - Current assets have names, descriptions, street addresses, icons etc.) then KML and google map engine layers which are file links and URL calls.

That is why I asked is it possible to have the following in Cobalt:

In "Asset Collection" which is a Cobalt Section, can there be two Catgories (one for location type Assets, on for KML/engine layer link type Assets).

Can the forms under Cobalt Types be linked to Section/Category rather than to Section?

So if I am editing/adding a location type Asset the entry form fields are relevant to that Asset type, and different form fields are displayed forKML/engine layer map types.

Then, via the parent child relationship between Collection and Asset, can I display the location Assets, KML Assets, and engine layer Assets that belong to each Collection on that Collection's map?


Sergey
Total posts: 13,748
16 Jul 2014 11:31

OK. Here is what I think

You add another field and call it KML. It may be uploads or text field. You insert URL.

Then in custom marker processor you also return this field and in JS you see if theer is KML property you use this property as link to KML file.


graphxks VIP
Total posts: 68
16 Jul 2014 12:50

Thanks Sergey. I am assuming that this field should be added to the collection and not the child assets?


Sergey
Total posts: 13,748
17 Jul 2014 00:51

graphxks should be added to the collection and not the child assets?

That depends. If every collection may have new KML file then to collection. If KML files are assosiated with assets only then may be it is good to add it to assets.


graphxks VIP
Total posts: 68
17 Jul 2014 02:01

Unfortunately it's not that simple. Trail Collections will have a trail layer associated but Trail collections may or may not have KML files associated. Other collections, such as Counties, have no trail associated, just assets in those counties.

I assume though that if I add the KML to the Collection I am back to the problem of not being able to show anything but the children of the parent/child relationship with the Assets.


Sergey
Total posts: 13,748
17 Jul 2014 23:54

If you add KML to collection, you can show it very simple. It will be either URL or file. But in marker processor you will always return full URL path and if it is there, you will load it on the map. So I think both Trial Collections and KMLs should be simple sields of Collections. And also I think parent/child cannot be used there anyway.


graphxks VIP
Total posts: 68
18 Jul 2014 14:04

Hmmm, Ok, I will try this!


graphxks VIP
Total posts: 68
22 Jul 2014 20:42

I suppose KML file would be an upload field, while Google Map Engine would be a text URL field?


Sergey
Total posts: 13,748
23 Jul 2014 01:58

graphxks while Google Map Engine would be a text URL field?

This is what? What is Google Map Engine?

graphxks I suppose KML file would be an upload field

Does not matter if it is upload or url, you will convert it to URL anyway. Because Google map API eats URL for KML. But with upload you may attach few KMLs to one Collection.


graphxks VIP
Total posts: 68
23 Jul 2014 02:33

Sergey his is what? What is Google Map Engine?

http://www.google.com/enterprise/mapsearth/products/mapsengine.html

Good for large scale data > Sergey

Does not matter if it is upload or url, you will convert it to URL anyway. Because Google map API eats URL for KML. But with upload you may attach few KMLs to one Collection.overlays.

I see. Thank you!

Powered by Cobalt