Reply To: Separate query selections for multiple post types in one mashup

Home Forums MapPress Support Separate query selections for multiple post types in one mashup Reply To: Separate query selections for multiple post types in one mashup

#11005
BradSiegfried
Participant

Hi Chris,

I have this almost working.  However, the resulting map center seems not to be as specified in the code.  If I manually move the displayed map, I can see my POIs, but the initial map center appears to be around 5 miles south of the desired coordinates, resulting in 39.601191,-75.605221 instead of the requested 39.749031, -75.57013.  There are no POIs in view on the initial map display.

You can see the results at http://dev-wilmington.crimeboard.org/units/182f/.

Code snippet:

function cbquerymap($atts, $content = null) {
global $cbdatefrom, $cbdateto;
extract( shortcode_atts( array(
‘cbdatefrom’ => date(‘Y-m-d’, strtotime(‘-30 days’)),
‘cbdateto’ => date(‘Y-m-d’),
‘cblat’=>”39.749031″,
‘cblng’=>”-75.57013″,
), $atts ) );
$result = “”;

… more code happens …

// Return the map display;
$mymap = new Mappress_Map(array(“width” => 300, “height” => 200, “zoom” => 13, “posts_per_page”=> -1, “overviewmapcontrol” => false, “maptypecontrol” =>false, “marker_body” => “none”, “marker_link” => true, “marker_title” => “post”, “poilist” => false, “center_lat” => $cblat, “center_lng” => $cblng));
$mymap->pois = $pois;
$result = $mymap->display();

$result .= “lat= $cblat, lng= $cblng”;
return ($result);

I see that there is one outlier POI much farther south than the rest.  It appears that the map center is being calculated rather than taken from the “center_lat” and “center_lng” values I specified.  Can you point me toward a solution?  Your login credentials are the same as before at http://dev-wilmington.crimeboard.org if you want to take a closer look.  See the “xper” plugin.

Thanks.

Brad