Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / AdsManager Support / [RESOLVED] Gmap Field

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

[RESOLVED] Gmap Field

More
11 years 3 months ago - 11 years 3 months ago #12860 by catalinads
[RESOLVED] Gmap Field was created by catalinads
When using gmap field i have this problem:
is completing the city field only if i click on go or press enter after i type some letters form a city and i select it
or if use drag frunction.

I want to take the city after user clicks on his selection from the list. Not to force him to press go.
In fact the marker is moving on the map whe selection is made. I know that after enter is formating the adress///

How to simulate an enter after click ?? or something like this


And another thing.. why if i edit the ad for example... the gmap field is empty.. doesnt store the last selection .. reveals me the placeholder for type something.
So if in database stores long and lat.. i think it should reveal the last selection...


here is an example of what i am speaking:
Example link
After click.. reveals .. in a field
Last edit: 11 years 3 months ago by loic.
More
11 years 3 months ago #12881 by catalinads
Replied by catalinads on topic Gmap Field
on google api there is this and displays in a form:
// This example displays an address form, using the autocomplete feature
// of the Google Places API to help users fill in the information.
 
var placeSearch, autocomplete;
var componentForm = {
  street_number: 'short_name',
  route: 'long_name',
  locality: 'long_name',
  administrative_area_level_1: 'short_name',
  country: 'long_name',
  postal_code: 'short_name'
};
 
function initialize() {
  // Create the autocomplete object, restricting the search
  // to geographical location types.
  autocomplete = new google.maps.places.Autocomplete(
      /** @type {HTMLInputElement} */(document.getElementById('autocomplete')),
      { types: ['geocode'] });
  // When the user selects an address from the dropdown,
  // populate the address fields in the form.
  google.maps.event.addListener(autocomplete, 'place_changed', function() {
    fillInAddress();
  });
}
 
function fillInAddress() {
  // Get the place details from the autocomplete object.
  var place = autocomplete.getPlace();
 
  for (var component in componentForm) {
    document.getElementById(component).value = '';
    document.getElementById(component).disabled = false;
  }
 
  // Get each component of the address from the place details
  // and fill the corresponding field on the form.
  for (var i = 0; i < place.address_components.length; i++) {
    var addressType = place.address_components[i].types[0];
    if (componentForm[addressType]) {
      var val = place.address_components[i][componentForm[addressType]];
      document.getElementById(addressType).value = val;
    }
  }
}
 
// Bias the autocomplete object to the user's geographical location,
// as supplied by the browser's 'navigator.geolocation' object.
function geolocate() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(function(position) {
      var geolocation = new google.maps.LatLng(
          position.coords.latitude, position.coords.longitude);
      var circle = new google.maps.Circle({
        center: geolocation,
        radius: position.coords.accuracy
      });
      autocomplete.setBounds(circle.getBounds());
    });
  }
}


in gmap of adsmaneger .. i cant handle how to take just the city...and to put in in ad_city after user select...not after hit enter or go
any hint ? a small one ...
More
11 years 3 months ago #12884 by tompap
Replied by tompap on topic Gmap Field
if you check the code

geocoder<?php echo $fieldid ?>.geocode({
latLng: pos
}, function(responses) {
...
updateDataForm(country, region, department, locality);

So normally it should update and value selected
More
11 years 3 months ago #12885 by catalinads
Replied by catalinads on topic Gmap Field
Take a look on this google link:
Autocomplete field
If you select a city.... the fields are put in a form.

This i want.. when select something from list... ad_city to be there..... not when drags on the map... or after hit enter
More
11 years 3 months ago #12900 by catalinads
Replied by catalinads on topic Gmap Field
Was fixed by Thomas by email!
More
11 years 3 months ago #12911 by loic
Replied by loic on topic Gmap Field
Great news :)

I update the topic to resolved.

Best regards.
Time to create page: 0.052 seconds
Powered by Kunena Forum