Harald Groven wrote:
> JS newbie question:
> I want to add some Gmap markers to an Exhibit that are "map
> constants", i.e. not handled by the faceted features, that won't be
> counted as an Item or made possible see or filter by facets.
> (E.g. a pin for "Campus adm" on a map of University institutes)
>
> I assume this is as easy to include as regular Gmaps, but I couldn't
> figure out how.
>
>   
Hi Harald,

What you need to do is to specify your own map constructor. In the HTML:

    <div ex:role="view"
       ex:viewClass="Map"
       ex:mapConstructor="myMapConstructor"
       ...
       ></div>


In Javascript,

    function myMapConstructor(div) {
       var map = ... construct the map ...

       var oldClearOverlays = map.clearOverlays;
       map.clearOverlays = function() {
           oldClearOverlays.call(this);
           ... add custom markers here ...
       }
      
       return map;
    }

David
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to