Wednesday, December 9, 2009

Re: Click on a map to submit lat/long

And for the record, it doesn't violate any of the terms.  It's probably a good thing you arent' a lawyer.  Tardaronious.
 
(a) require a fee-based subscription or other fee-based restricted access; or
(b) operate only behind a firewall or only on an internal network (except during the development and testing phase).
 
We are free, we just require a sign up process.  We also aren't behind a firewall.
 
Sigh.  All that nonsense for what?
 
For all others, I posted it on an easily accesible URL.  Here is is again.  kyndoutdoors.com/google_map_test.cfm
 


 
On Wed, Dec 9, 2009 at 10:07 AM, Marcelo <marcelo555@hotmail.com> wrote:
On Dec 9, 5:46 pm, Andy Idema <idesd...@gmail.com> wrote:
> Dude.  I don't have a premier license.  If you really want to see the code
> be my guest.  Talk to you in a few days.
>
> http://www.nwportal.fs.usda.gov/USFS_R6/ITEAM/google_map_test.cfm

If that site is using the free API, then I believe it is violating
Google's Terms of Service, specifically point 9.1, as it doesn't look
as if any ordinary person can get a login to that site.

But hey, I am not a lawyer.


--
Marcelo - http://maps.forum.nu
--




>
> On Wed, Dec 9, 2009 at 9:43 AM, Marcelo <marcelo...@hotmail.com> wrote:
> > On Dec 9, 5:35 pm, Andy Idema <idesd...@gmail.com> wrote:
> > > I mean really?  How hard is it to just point me in the right direction.
>
> > Not very hard, but since you must have a Premier license, you have
> > already paid for support, so the group's volunteers can concentrate
> > out efforts on helping those who are using the free license, and
> > following the rules.
>
> > --
> > Marcelo -http://maps.forum.nu
> > --
>
> >  > On Wed, Dec 9, 2009 at 9:28 AM, Marcelo <marcelo...@hotmail.com> wrote:
> > > > On Dec 9, 5:11 pm, Andy Idema <idesd...@gmail.com> wrote:
> > > > > I know but my site is a government site and requires a 3 day sign up
> > > > > process.
>
> > > > Then contact your Google representative for support.
> > > > It is included in the price you paid for your Premier license.
>
> > > > --
> > > > Marcelo -http://maps.forum.nu
> > > > --
>
> > > > > So I went with the alternative.
>
> > > > > Here it is again
>
> > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> > > >http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > > > > <html>
> > > > >   <head>
> > > > >     <meta http-equiv="content-type" content="text/html;
> > charset=UTF-8"/>
> > > > >     <title>Google Maps</title>
> > > > >     <script src="http://maps.google.com/maps?file=api&v=2&key=<
> > > >http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAftdhw2m_...>"
> > > > > type="text/javascript"></script>
> > > > >   </head>
> > > > >   <body onunload="GUnload()">
>
> > > > > <form name="billgoat" action="google_map_test_action.cfm"
> > method="post">
> > > > > <input type="hidden" name="lat" value="38.93714"   id="click_lat"
> > > > > onclick="this.blur()">
> > > > > <input type="hidden" name="long" value="-97.20632" id="click_long"
> > > > > onclick="this.blur()">
> > > > > <input type="submit" name="Save">
> > > > > </form>
> > > > >     <div id="map" style="width: 400px; height: 300px"></div>
> > > > >     <script type="text/javascript">
> > > > >     //<![CDATA[
>
> > > > >     var map = new GMap(document.getElementById("map"));
> > > > >     map.addControl(new GSmallMapControl());
>
> > > > >     // center and zoom to the lat/long in the form
> > > > >     map.centerAndZoom(new GPoint(
> > > > >                 document.getElementById('click_long').value,
> > > > >                 document.getElementById('click_lat').value), 12);
>
> > > > >     GEvent.addListener(map, 'click',
> > > > >         function(overlay, point) {
> > > > >             if (point) {
> > > > >                 document.getElementById('click_lat').value = point.y;
> > > > >                 document.getElementById('click_long').value =
> > point.x;
> > > > >             }
> > > > >         }
> > > > >     );
> > > > >     //]]>
> > > > >     </script>
>
> > > > >   </body>
> > > > > </html>
>
> > > > > On Wed, Dec 9, 2009 at 9:08 AM, geocode...@gmail.com
> > > > > <geocode...@gmail.com>wrote:
>
> > > > > > On Dec 9, 7:26 am, aidema <idesd...@gmail.com> wrote:
> > > > > > > Ok I decided to go with this....
>
> > > > > > snip...
>
> > > > > > > However, I still need two very important features.  1 - When the
> > user
> > > > > > > clicks I want to display a pinpoint.  2 - If the user clicks
> > again I
> > > > > > > want to take away the initial pinpoint and add one where the new
> > > > click
> > > > > > > was.
>
> > > > > > > Any advice/assistance is greatly appreciated.
>
> > > > > > I may have missed the link to your map in all the code you posted.
> > > > > > The best advice is to read and follow the posting guidelines (post
> > a
> > > > > > link, not code).
>
> > > > > >  -- Larry
>
> > > > > > > Thanks!!!!
>
> > > > > > > On Dec 9, 8:13 am, aidema <idesd...@gmail.com> wrote:
>
> > > > > > > > Mike,
>
> > > > > > > > Your tutorial is good but it looks like it stores the data to a
> > > > file
> > > > > > > > on the server.
>
> > > > > > > > When the user clicks a pinpoint and then enters details into
> > the
> > > > popup
> > > > > > > > ballopn and presses submit, I want the form to process and
> > navigate
> > > > to
> > > > > > > > another page.
>
> > > > > > > > Currently this is not working for me.
>
> > > > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
> > > > > >http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > > > > > > > <html>
> > > > > > > >   <head>
> > > > > > > >     <meta http-equiv="content-type" content="text/html;
> > > > charset=UTF-8"/
>
> > > > > > > >     <title>Google Maps</title>
> > > > > > > >     <script src="http://maps.google.com/maps?
> > > > > > > > file=api&v=2&key=mykey" type="text/javascript"></script>
> > > >  > > > >   </head>
> > > > > > > >   <body onunload="GUnload()">
>
> > > > > > > >     <div id="map" style="width: 550px; height: 450px"></div>
> > > > > > > >     <a href="store.htm">Back to the tutorial page</a>
>
> > > > > > > >     <noscript><b>JavaScript must be enabled in order for you to
> > use
> > > > > > > > Google Maps.</b>
> > > > > > > >       However, it seems JavaScript is either disabled or not
> > > > supported
> > > > > > > > by your browser.
> > > > > > > >       To view Google Maps, enable JavaScript by changing your
> > > > browser
> > > > > > > > options, and then
> > > > > > > >       try again.
> > > > > > > >     </noscript>
>
> > > > > > > >     <script type="text/javascript">
>
> > > > > > > >     if (GBrowserIsCompatible()) {
>
> > > > > > > >       var lastmarker;
> > > > > > > >       var iwform = 'Enter details:<br>'
> > > > > > > >                  + '<form name="submitit"
> > onsubmit="process(this);
> > > > > > > > return false" action="google_map_test_action.cfm">'
> > > > > > > >                  + '  <textarea name="data" rows="5"
> > cols="40"><\/
> > > > > > > > textarea><br>'
> > > > > > > >                  + '  <input type="submit" value="Submit" />'
> > > > > > > >                  + '<\/form>';
>
> > > > > > > >       // == creates a draggable marker with an input form ==
> > > > > > > >       function createInputMarker(point) {
> > > > > > > >         var marker = new GMarker(point,{draggable:true,
> > > > > > > > icon:G_START_ICON});
> > > > > > > >         GEvent.addListener(marker, "click", function() {
> > > > > > > >           lastmarker = marker;
> > > > > > > >           marker.openInfoWindowHtml(iwform);
> > > > > > > >         });
> > > > > > > >         map.addOverlay(marker);
> > > > > > > >         marker.openInfoWindowHtml(iwform);
> > > > > > > >         lastmarker=marker;
> > > > > > > >         return marker;
> > > > > > > >       }
>
> > > > > > > >       // == creates a "normal" marker
> > > > > > > >       function createMarker(point,text) {
> > > > > > > >         var marker = new GMarker(point);
> > > > > > > >         GEvent.addListener(marker,"click", function() {
> > > > > > > >           marker.openInfoWindow(document.createTextNode(text));
> > > > > > > >         });
> > > > > > > >         map.addOverlay(marker);
> > > > > > > >         return marker;
> > > > > > > >       }
>
> > > > > > > >       // == Display the map, with some controls and set the
> > initial
> > > > > > > > location
> > > > > > > >       var map = new GMap2(document.getElementById("map"),
> > > > > > > > {draggableCursor:"default"});
> > > > > > > >       map.addControl(new GLargeMapControl());
> > > > > > > >       map.addControl(new GMapTypeControl());
> > > > > > > >       map.setCenter(new GLatLng(43.907787,-79.359741),8);
>
> > > > > > > >       // == Listen for map click and add an input marker
> > > > > > > >       GEvent.addListener(map,"click",function(overlay,point){
> > > > > > > >         if (!overlay) {
> > > > > > > >           createInputMarker(point);
> > > > > > > >         }
> > > > > > > >       });
>
> > > > > > > >       function process(form) {
> > > > > > > >         // == obtain the data
> > > > > > > >         var details = form.data.value;
> > > > > > > >         var lat = lastmarker.getPoint().lat();
> > > > > > > >         var lng = lastmarker.getPoint().lng();
> > > > > > > >         var url = "myserver.php?lat=" +lat+ "&lng=" +lng+
> > > > > > > > "&details="+details;
>
> > > > > > > >         // ===== send the data to the server
> > > > > > > >         GDownloadUrl(url, function(doc) {    });
>
> > > > > > > >         // == remove the input marker and replace it with a
> > > > completed
> > > > > > > > marker
> > > > > > > >         map.closeInfoWindow();
> > > > > > > >         var marker =
> > createMarker(lastmarker.getPoint(),details);
> > > > > > > >         GEvent.trigger(marker,"click");
>
> > > > > > > >       }
>
> > > > > > > >       // === Define the function thats going to read the stored
> > > > data
> > > > > > > > ===
> > > > > > > >       readData = function(doc) {
> > > > > > > >         // === split the document into lines ===
> > > > > > > >         lines = doc.split("\n");
> > > > > > > >         for (var i=0; i<lines.length; i++) {
> > > > > > > >           if (lines[i].length > 1) {
> > > > > > > >             // === split each line into parts separated by "|"
> > and
> > > > use
> > > > > > > > the contents ===
> > > > > > > >             parts = lines[i].split("|");
> > > > > > > >             var lat = parseFloat(parts[0]);
> > > > > > > >             var lng = parseFloat(parts[1]);
> > > > > > > >             var details = parts[2];
> > > > > > > >             var point = new GLatLng(lat,lng);
> > > > > > > >             // create the marker
> > > > > > > >             var marker = createMarker(point,details);
> > > > > > > >           }
> > > > > > > >         }
> > > > > > > >       }
> > > > > > > >       // === read data entered by previous users ===
> > > > > > > >       GDownloadUrl("details.txt", readData);
>
> > > > > > > >     }
>
> > > > > > > >     //
>
> ...
>
> read more »

--

You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.



--

You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate