Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 281669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:13:23+00:00 2026-05-12T05:13:23+00:00

How can I expand ths function with a search field for a location? <tr>

  • 0

How can I expand ths function with a search field for a location?

    <tr>
      <td class="XSdataCol1" valign="top" align="bottom">[[description]]: [[help]]</td>
      <td class="XSdataCol2">
        <form>
            please add here tour search location <br>
            <input type="text" name="adres" value=""><input type="Submit" name="Submit"value="Submit" onclick="zoekAdres_[[fieldname]]()]">
        </form>
        <div onclick="removeMarker_[[fieldname]]()">remove marker</div>
        <input type="hidden" maxlength="255" name="[[fieldname]]" value="[[value]]">
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<xsproc name="C_GoogleMaps::getAPIKey"></xsproc>" type="text/javascript"></script>
        <script type="text/javascript">

          var map_[[fieldname]];
          var markerCount_[[fieldname]]=0;
          var marker_[[fieldname]];

          function updateLocatie(point) {
            console.log(point);
            if (point) {
              document.forms.mainform.[[fieldname]].value="("+ point.y + "," + point.x +")";
            }
          }

          function removeMarker_[[fieldname]]() {
            markerCount_[[fieldname]]=0;
            document.forms.mainform.[[fieldname]].value="";
            map_[[fieldname]].clearOverlays();
          }
          function zoekAdres_[[fieldname]](){

          }

          function load_[[fieldname]]() {
            if (GBrowserIsCompatible()) {
              map_[[fieldname]]=new GMap2(document.getElementById("map_[[fieldname]]"));
              map_[[fieldname]].enableScrollWheelZoom();
              map_[[fieldname]].enableContinuousZoom();
              map_[[fieldname]].enableDoubleClickZoom();
              map_[[fieldname]].addControl(new GLargeMapControl());

              var lat_center=<xsproc name="C_GoogleMaps::getLatCenter" params="[[value]]"></xsproc>;
              var long_center=<xsproc name="C_GoogleMaps::getLongCenter" params="[[value]]"></xsproc>;

              var lat_point=<xsproc name="C_GoogleMaps::getLatCenter" params="[[value]]"></xsproc>;
              var long_point=<xsproc name="C_GoogleMaps::getLongCenter" params="[[value]]"></xsproc>;

              var zoomlevel=<xsproc name="C_GoogleMaps::getLastZoomlevel"></xsproc>;
              map_[[fieldname]].setCenter(new GLatLng(lat_center,long_center),zoomlevel);

              GEvent.addListener(map_[[fieldname]],'click', function(overlay,point) {
                  //check of we al een marker hebben
                  if (point && markerCount_[[fieldname]]==0) {
                    updateLocatie(point);
                    marker_[[fieldname]]=new GMarker(point,{icon:G_DEFAULT_ICON, draggable: true});
                    GEvent.addListener(marker_[[fieldname]], "dragend", function() {
                        updateLocatie(marker_[[fieldname]].getPoint());
                        //map_[[fieldname]].panTo(marker_[[fieldname]].getPoint()); 
                      }
                    );
                    map_[[fieldname]].addOverlay(marker_[[fieldname]]);
                    markerCount_[[fieldname]]++;
                  }
                }
              );

              //Check of er een marker in de database was opgeslagen
              var p="[[value]]";
              if (p!="") {
                var point=new GLatLng(lat_point,long_point);
                marker_[[fieldname]]=new GMarker(point,{icon:G_DEFAULT_ICON, draggable: true});
                GEvent.addListener(marker_[[fieldname]], "dragend", function() {
                    updateLocatie(marker_[[fieldname]].getPoint());
                    map_[[fieldname]].panTo(marker_[[fieldname]].getPoint()); 
                  }
                );
                map_[[fieldname]].panTo(point); 
                map_[[fieldname]].addOverlay(marker_[[fieldname]]);
                markerCount_[[fieldname]]++;
              }
            }
          }
        </script>
        <div id="map_[[fieldname]]" style="width:396px; height:300px"></div>
        <script type="text/javascript">
          window.onload=load_[[fieldname]];
          window.onunload=GUnload;
      </script>       

      </td>
      <td class="XSdataCol">&nbsp;</td>
</tr>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:13:23+00:00Added an answer on May 12, 2026 at 5:13 am

    Have you already had a look at the Geocoding example found on google map API website :

    var map = new GMap2(document.getElementById("map_canvas"));
    var geocoder = new GClientGeocoder();
    
    function showAddress(address) {
      geocoder.getLatLng(
        address,
        function(point) {
          if (!point) {
            alert(address + " not found");
          } else {
            map.setCenter(point, 13);
            var marker = new GMarker(point);
            map.addOverlay(marker);
            marker.openInfoWindowHtml(address);
          }
        }
      );
    }
    

    Is this function what you are looking for ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP, how can I replicate the expand/contract feature for Tinyurls as on search.twitter.com?
What I want is lots of nodes which can expand making a mind map.
In Eclipse you can double-click on the tab of the code window and expand
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
i was looking for macro which can expand like the following: FILL_BUFF(4) should be
Using the Windows XP CMD command-line I can expand a variable twice as follows:
When coding in Visual C# Express 2008, you can expand/collapse code segments using the
I hope anyone from the large community here can help me write the simplest
Friends, I'm facing another challenge in APEX and I hope you can help. I
Can somebody point me to a resource that explains how to go about having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.