simple map extension

217 views
Skip to first unread message

Dan Lange

unread,
Jun 12, 2008, 9:41:51 PM6/12/08
to simile-...@googlegroups.com
[originally posted to gen...@simile.mit.edu]

I've made some changes to the map extension to remove the dependency on the marker servlet. In the process I also removed quite a bit of code that no longer applies. For my own purposes, I've moved this code to a new file I call simplemap-view.js. The functionality of rendering text onto an icon is now accomplished using LabeledMarker which is part of the gmaps-utility-library (http://code.google.com/p/gmaps-utility-library/). For my project this extension renders my map about five seconds faster than the original map extension. Not to mention I no longer need to make an external http call. I also added the terrain map to the list of maps a user may choose from.

Not sure if the community would be interested in this but I'll make it available anyhow. I've attached the file to this message. Should you want to include this, let me know if there is anything else you'd like me to do.


Cheers!

Dan

simplemap-view.js

Scott Ostler

unread,
Jun 12, 2008, 11:07:20 PM6/12/08
to simile-...@googlegroups.com
Hi Dan,

That sounds great! Those would be good changes to make to the map
extension, so if anyone's interested in trying this version out and
reporting how it goes, that would be great.

Scott

David Huynh

unread,
Jun 20, 2008, 1:12:32 PM6/20/08
to simile-...@googlegroups.com
Dan,

There's been some interest in making Exhibit plot not just map markers
but also map polygons and polylines. Given your expertise on Google
Maps, would you be interested in seeing how that might be implemented? :-)

David

dimitris

unread,
Jul 23, 2008, 3:01:27 AM7/23/08
to SIMILE Widgets
Hi Dan,

I think just may address a few needs of mine, so I'd be keen to make
it work. Do you have instructions on where to put the file, where to
include it, and so forth? I tried to change lines 14- in exhibit/src/
webapp/extensions/map/map-extension.js (having copied your simplemap-
view.js to the same folder where map-view.js and vemap-view.js are)
to

var javascriptFiles = [
"simplemap-view.js",
// "map-view.js",
// "vemap-view.js"
];

but that doesn't do it. I've also included LabeledMarker in my script
calls elsewhere on the page, but still it won't work.

If you have the time, could you please post a simple example to serve
as a boilerplate for further development?

Thanks in advance,

/Dimitris

On Jun 13, 4:41 am, "Dan Lange" <metalifl...@gmail.com> wrote:
> [originally posted to gene...@simile.mit.edu]
>  simplemap-view.js
> 20KDownload

ILVC

unread,
Jul 30, 2008, 9:17:32 AM7/30/08
to SIMILE Widgets
Hello David! In a very early posting my example also renders polygons
but my solutions depends largely on KMLs , KMZ files and naming
conventions thus I'm not happy with the design. If there is any new
development on the map extension please count me in.

On Jun 20, 1:12 pm, David Huynh <dfhu...@alum.mit.edu> wrote:
> Dan,
>
> There's been some interest in making Exhibit plot not just map markers
> but also map polygons and polylines. Given your expertise on Google
> Maps, would you be interested in seeing how that might be implemented? :-)
>
> David
>
> Scott Ostler wrote:
> > Hi Dan,
>
> > That sounds great! Those would be good changes to make to the map
> > extension, so if anyone's interested in trying this version out and
> > reporting how it goes, that would be great.
>
> > Scott
>
> > On Thu, Jun 12, 2008 at 9:41 PM, Dan Lange <metalifl...@gmail.com> wrote:
>
> >> [originally posted to gene...@simile.mit.edu]
>

thaiboxer

unread,
Jul 30, 2008, 9:26:31 PM7/30/08
to SIMILE Widgets
i am also looking to try the simplemap (overlays!), "a simple example
to serve
as a boilerplate" would be a great place to start.

Dan Lange

unread,
Aug 28, 2008, 12:09:59 PM8/28/08
to simile-...@googlegroups.com
Whoops, missed this message. Here's an example for anyone interested...

Just put the file in the scripts directory and add a reference to it in the var javascriptFiles. Like this:
var javascriptFiles = [                             
                                                                                                     
        "map-view.js",                                                                                                                                       
        "simplemap-view.js",                                                                                                                                 
        "vemap-view.js"                                                                                                                                      
    ];

You'll need a little different syntax in your html as well.  Something like this should work.
<div ex:role="view"                                                                                                                          
                    ex:viewClass="SimpleMap"                                                                                                                 
                    ex:type="satellite"                                                                                                                      
                    ex:latlng=".latLng"                                                                                                                 
                    ex:pin="false"                                                                                                                           
                    ex:icon="marker.png"                                                                                                                  
                    ex:iconShadow="marker_shadow.png"                                                                                                     
                    ex:iconLabelOffsetX="-7"                                                                                                                 
                    ex:iconLabelOffsetY="-12"                                                                                                                
                    ex:iconHeight="30"                                                                                                                       
                    ex:iconWidth="23"                                                                                                                        
                    ex:mapHeight="600"                                                                                                                       
                    ex:size="medium"                                                                                                                         
                    ex:overviewControl="true"                                                                                                                
                    >

Reply all
Reply to author
Forward
0 new messages