Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AJAX loading for additional posts #568

Open
GoogleCodeExporter opened this issue Apr 4, 2015 · 2 comments
Open

AJAX loading for additional posts #568

GoogleCodeExporter opened this issue Apr 4, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

It would be great to be able to use some custom javascript like this after a 
map has loaded:

jQuery.ajax( {
    url: properties.ajaxurl,
    dataType: 'jsonp',
    data: {
        near_lat: initialLocation.lat,
        near_lng: initialLocation.lng,
        radius_km: 100
    },
    success: function( data ) {
        GeoMashup.addObjects( data );
    }
} );

This may not work yet (see the group thread below), but should be possible 
without too much additional development.

https://groups.google.com/forum/?hl=en&fromgroups#!topic/wordpress-geo-mashup-pl
ugin/1vx6PQRIjDU

Original issue reported on code.google.com by dylankk...@gmail.com on 27 Apr 2012 at 9:25

@GoogleCodeExporter
Copy link
Author

A few corrections are needed to the above snippet: the URL is wrong and the 
reference passed to addObjects is wrong (props Adam Hayek on the list for 
that). Corrected snippet:

jQuery.ajax( {
      url: properties.geo_query_url,
      data:{
     near_lat: initialLocation.lat,
     near_lng: initialLocation.lng,
     radius_km: 10,
      },
      success: function(data) {
     GeoMashup.addObjects( data.objects ); 
      }
});

Original comment by dylankk...@gmail.com on 14 May 2012 at 4:13

@GoogleCodeExporter
Copy link
Author

I think this may be the solution to what I'm trying to achieve - but I'm not 
sure how to implement this.

Original comment by netb...@blueridgeoutdoors.com on 5 Jun 2012 at 2:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant