> But the parameter "location" of your command has to be tiny, one word. > I want the latLng of a string with many words, like "Av. Washington > Soares 1321, Fortaleza".
To fix that, the location variable needs to be passed into EncodeURIComponent() before being added to the end of the URL. - Blair On 14/11/2008 9:27 AM, Douglas Nogueira wrote: > But the parameter "location" of your command has to be tiny, one word. > I want the latLng of a string with many words, like "Av. Washington > Soares 1321, Fortaleza". > I have found some problems with this kind of string in your command. > That way i cant use nothing of your command. > > And the command "CmdUtils.getGeoLocation()" , i think he wont be useful > for me. This command return the latLng based on my ip, isnt it? I dont > want that. I want the coordenates of a given address. > > All the examples of get the coordinates, that i found, need a page html > (with a google maps key ) to do the request to google maps. I need a way > to do that just with js. > > ----- > > Doug > > > 2008/11/13 <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > hmm, could you give me an example use case? > > > On Thu, Nov 13, 2008 at 1:30 AM, Blair McBride <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Very useful idea! I think if it were converted into a noun type, it > could be used for other commands working with > addresses/geo-coordinates too. > > - Blair > > > > > > On Thu, Nov 13, 2008 at 9:45 AM, <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hello Doug, > > > > Simply put, the command does the following: > > > > Take a string representing a location as input (E.g. Ontario, > Canada or NW1 > > 5BD) > > Use the tinygeocoder service to produce a corresponding > Geocode and place it > > on your clip-board > > The map is displayed purely for visual purposes and serves no > other use at > > the moment. And no, You dont need to have a good maps api key > to use it. > > > > For me it was a learning exercise for using Jquery to submit > requests to a > > website and process the response :-) > > > >>> var geocoder = new GClientGeocoder(); > >>> var latLng = geocoder.getLatLng(address, function(point) { } ); > >>> > > No, it cant be used that way. Like the built-in tinyurl > command, this one > > was built with the intention of letting people use the > tinygeocoder without > > visiting the website. > > > > Depending on what you want to do, you may want to check out > > > > CmdUtils.getGeoLocation() > > > > - Mayuresh > > > > On Wed, Nov 12, 2008 at 7:40 PM, Douglas Nogueira > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > wrote: > >> > >> I want to know if i can do this inside of a ubiquity command: > >> > >> var geocoder = new GClientGeocoder(); > >> var latLng = geocoder.getLatLng(address, > >> function(point) { } ); > >> > >> > >> Given a string with the address, i want her LatLng. > >> I need a key of the google maps for that? > >> In your tiny-geocoder, you use that? > >> > >> ---- > >> Doug > >> > >> 2008/11/12 <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > >>> > >>> Hi, > >>> > >>> I've just put together a command for generating geocodes > using the free > >>> api service @ http://tinygeocoder.com/ . It's at: > >>> > >>> http://mskadu.googlepages.com/tinygeocode > >>> > >>> code at: > >>> > > http://code.google.com/p/ubiquity-commands/source/browse/trunk/scripts/tinygeocode.ubiq.js > >>> > >>> Any comments/ criticism welcome! > >>> > >>> -- > >>> Mayuresh > >>> > >>> > >> > >> > >> > > > > > > > > -- > > Mayuresh > > > > > > > > > > > > > -- > Mayuresh > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ubiquity-firefox" 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/ubiquity-firefox?hl=en -~----------~----~----~----~------~----~------~--~---
