I'm not sure if this is the proper way to do this, but the following
works for me.
Basically, I define a simple "map" variable outside of all Exhibit
javascript, so it's accessible to all of your own code. Then, override
the Exhibit function that produces the Google Map and assign it to the
"map" variable. So, in your Exhibit, add the following AFTER
referencing the exhibit and map extensions js files.
<script type="text/javascript">
var map;
var oldMapViewReconstruct = Exhibit.MapView.prototype._reconstruct;
Exhibit.MapView.prototype._reconstruct = function() {
oldMapViewReconstruct.call(this);
map = this._map;
};
</script>
You can then do things like:
<a href="javascript:maptest();">Test GMap</a>
function maptest() {
//to add a marker
var cpoint = new GLatLng(39.823,-75.723);
var cmarker = new GMarker(cpoint,{draggable: true});
map.addOverlay(cmarker);
//to pan/move to a location
map.panTo(new GLatLng(37.4569, -75.1569));
}
- John
Marko wrote:
> Thanks, but that is not what I was looking for. There were links to
> places on the map, right below the map. The links where just plain
> html, very simple: <a href="javascript:???">link</a>
>
> On Jun 24, 6:33 pm, David Karger <[email protected]> wrote:
>
>> the presidents map uses a "coordinator" such that when you click on a
>> president in a timeline the map jumps to their place in the map.
>>
>> Marko wrote:
>>
>>> Hello,
>>>
>>> Recently i've seen an exhibit map with links underneath where you
>>> could jump to a point in the map. Unfortunately, I have forgotten to
>>> bookmark the page. Does anyone how to include the jumps?
>>>
>>> --
>>> Regards,
>>> Marko
>>>
>>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---