Hi, Rubén, I have a problem about the map, I can't send the Ajax Request when click the Geolocate button, the page has no activity, but when I include the prototype.js in the events/new or events/event_form page, the map_div layer was become disappear, but I can sent the Ajax Request and get the geolocate of the address data, but it shows the error "RJS error: ReferenceError: map is not defined".
The source code of this is partial of my page shows below: <label for="map">Location:</label> <input id="event_lat" name="event[lat]" type="hidden" value="0.0" / > <input id="event_lng" name="event[lng]" type="hidden" value="0.0" / > <script src="http://maps.google.com/maps? file=api&v=2&key=REPLACE_WITH_YOUR_GOOGLE_KEY" type="text/javascript"></script> <div id="map_div"></div> <input id="address" name="address" type="text" /> -------------------------------------------------------------------------------- <input name="geolocate_button" onclick="new Ajax.Request('/events/ geolocate?method=get', {asynchronous:true, evalScripts:true, onComplete:function(request){$("#loading").css ("visibility","hidden")}, parameters:Form.serialize (this.form) + '&authenticity_token=' + encodeURIComponent ('b9eab1adfdd0deb39c14d801cebce4d6')}); $("#loading").css ("visibility","visible"); return false;" type="button" value="Geolocate" /> -------------------------------------------------------------------------------- <img alt="Loader" class="hidden" id="loading" src="/images/ loader.gif?1236145037" /> It looks like the quote partial has some different with your project's source code: <input name="geolocate_button" onclick="$.ajax({async:true, complete:function(request){$("#loading").css ("visibility","hidden")}, data:$.param($ (this.form).serializeArray()) + '&authenticity_token=' + encodeURIComponent('87c75468f5cf672f9803bddce4e30ed684045ab9'), dataType:'script', url:'/events/geolocate?method=get'}); $ ("#loading").css ("visibility","visible"); return false;" type="button" value="Geolocate" /> I don't know how to fix this problem. Can you tell me, thank you!! On 2月11日, 下午9時08分, Yuki (aka Rubén Gómez) <[email protected]> wrote: > Hello! > > I have added some maps to the events part, as you can see in the > images I send you. To show the maps I'm using google maps api on pure > javascript, because the plugin ym4r has some limitations I don't like. > > For the geolocation I'm using the plugin geokit, but I'm not sure if > it's a good idea, because the geolocation is only limited for when a > new event is created, so maybe the plugin can be deleted, and use only > the google map api. > > I have to do a new tab for the person profile to see what event's the > person creates, the location of events, and how many people will > attend. > > Any feature to add? A good idea will be to add an events search by > address, and see what events are near the address the people insert... > what do you think? > > The code is inhttp://github.com/yuki/insoshi/tree/events_modification > > Image1http://fotazas.com/v2_photo_b01157.png.htm > Image2http://fotazas.com/v2_photo_8787a5.png.htm --~--~---------~--~----~------------~-------~--~----~ Insoshi developer site: http://dogfood.insoshi.com/ Insoshi documentation: http://docs.insoshi.com/ You received this message because you are subscribed to the Google Groups "Insoshi" 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/insoshi?hl=en -~----------~----~----~----~------~----~------~--~---
