--
You received this message because you are subscribed to the Google Groups "Wagn Developers" group.
To post to this group, send email to wagn...@googlegroups.com.
To unsubscribe from this group, send email to wagn-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wagn-dev?hl=en.
Gotta admit I have been enjoying wadding through your code :)
What I want, and need to do, is to display a google map in a card, the
user should be able to drop markers, find places, and generate
routes...
More or less, something like this:
http://playplanetproject.appspot.com/playplanet.jsp (click around to
see the functionality)
But, every change to the map will be saved so that the card reproduces
the map every time is it loaded (I would use autosave for that).
Basically, user puts a marker, it goes to ActiveRecord, user makes a
route, goes into ActiveRecord, etc.
Later on, the map cards should be findable by wagn search
(geolocation, marker names, places involved, etc)
So far, I have been trying to just get one map working in a new card
by overriding the editor. but I need some dynamically generated
javascript there to visualize it.
Javascript doesnt work when inside a <div>(define_view renders its
contents inside a <div> )...I am pretty sure if I put that javascript
in <head> or <body> it will work, but so far I haven't realized how to
put it there...
I am not sure if I need separate subcards, the model for the map can
contain all the information needed by itself, but hey, I am willing to
try...just point me in the right direction (some comments in the code
would be welcome :)
Anyway, I really want to integrate google maps to the idea of cards...
-rafa
On Tue, Sep 13, 2011 at 12:53 AM, Ethan McCutchen
<et...@grasscommons.org> wrote:
> Oh, you're getting into the modules api. Awesome!
> But are you sure you need to for this case? If you're just combining
> javascript with other essentially static content, it might be easier to do
> this with formatting.
> In the example you pasted, it looks like you're overriding the editor. Is
> part of the idea that you would have an editor with multiple sections?
> Typically when we do that, we like to store the separate information in
> separate subcards. Would that work for you?
> - ethan
>
>
>
> On Sat, Sep 10, 2011 at 2:42 AM, rafael perez <hdk...@gmail.com> wrote:
>>
>> But what if I want something like this:
>>
>> # wagn/.../packs/types/map_pack.rb
>> Wagn::Renderer
>>
>> define_view ( :editor, :type => 'map') do
>> Stuff
>> JavaScript to render
>> Stuff
>> end
-rafa
Hi again,
Well, I got gmaps to show on a card and I need a new model to connect to it.
I tried generating one with the generator and well, didnt work...
also I tried using Wagn::Model::MapModel and it didnt work...
Is there anything special that has to be done for the models to work?