Try loading an XML/KML from your local web server instead of remotely.

Also, to make the overlay permanent, I don't think using the mapConstructor
function will work.  IIRC, these overlays get removed (and not added back)
while you're in the map view when facets get selected (or deselected.)  Use
Exhibit.MapView.prototype._reconstruct

Here is an example:
http://www.dgs.udel.edu/projects/delaware-offshore-geologic-inventory-map
(I do use mapConstructor here as well but only for map controls and
location.)

- John

**************************************************
John Callahan, Research Scientist
Delaware Geological Survey, University of Delaware
URL: http://www.dgs.udel.edu
**************************************************


On Mon, Nov 1, 2010 at 5:41 PM, Frederic_L <[email protected]>wrote:

> Hi,
>
> I built an Exhibit with this new map constructor below and it's
> working fine. But I would like to add Overlays from several KML files
> I have. I would like these overlays to be permanent and not in the
> dataset I load with Exhibit. So I tried to add an overlay in the new
> map constructor < map.addOverlay(new GGeoXml("http://www.france-
> science.org/map/chicago3.kml"));>, but it does not work (I tested to
> add the KML as an overlay in another file without Exhibit and it's
> working).
>
> By the way, the addOverlay of Wikipedia or panomario is working.
>
> Do you have an idea of what could be wrong ?
>
> Thank you very much !
>
> <script>
>    var newMapConstructor = function(mapDiv) {
>        var map;
>                map = new GMap2(mapDiv);
>        map.setCenter(new GLatLng(38.788345,-95.273437), 4);
>        map.addControl(new GLargeMapControl3D());
>        //map.addControl(new GMenuMapTypeControl());
>        map.addControl(new GMapTypeControl());
>        map.addControl(new GScaleControl());
>        map.addMapType(G_PHYSICAL_MAP);
>        map.setMapType(G_NORMAL_MAP);
>        map.enableScrollWheelZoom();
>        map.enableContinuousZoom();
>        map.addOverlay(new GGeoXml("http://www.france-science.org/map/
> chicago3.kml"));
>        //map.addOverlay(new GLayer("com.panoramio.all"));
>        //map.addOverlay(new GLayer("org.wikipedia.en"));
>        return map;
>    }
>  </script>
>
> --
> You received this message because you are subscribed to the Google Groups
> "SIMILE Widgets" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<simile-widgets%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/simile-widgets?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to