Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

[Geo Mashup] Version 1.4.6 in template page WordPress

  • SOLVED

Hello everyone,

I installed Geo Mashup version 1.4.6 on a site due having WP 3.3.1 and I put a template page at this address:

[[LINK href="http://www.comune.binago.co.it/binago-e-dintorni/"]]binago e dintorni[[/LINK]]

where it calls this line of code:

<?php echo GeoMashup::map('load_empty_map=true&add_google_bar=true&add_map_type_control=G_NORMAL_MAP,G_SATELLITE_MAP,G_PHYSICAL_MAP,G_HYBRID_MAP'); ?>

I settled in Contextual Page of Geo Mashup options, which is related to template function:

Width map: 100%
Height map: 400px
Map controls: 3D wide zoom
Standard map type: traffic
Add control map types: traffic+sat+hybrid+terrain
Add general controls: yes
Standard zoom level: 14

I saved a point in the page:

[[LINK href="www.comune.binago.co.it/amministrazione/"]]Amministrazione[[/LINK]]

where once saved I should see in the combo "Select from:" the point just saved but it doesn't show up, plus in the page template of the map linked above, as you can see, I should see the point saved since in the documentation it says it should retrieve points from posts and pages, but it doesn't show; even it should show map zoomed at 14 instead of total zoom (0 level) and plus I should see also the buttons traffic+sat+hybrid+terrain...

I tried also to remove the plugin, delete data and reinstall plugin but it doesn't change anything either...

Any idea?
Thanks to everyone!
Ciao,
Luigi

Answers (2)

2012-02-04

Kannan C answers:

Are you calling the function after the_posts() ?

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php echo GeoMashup::map('load_empty_map=true&add_google_bar=true&add_map_type_control=G_NORMAL_MAP,G_SATELLITE_MAP,G_PHYSICAL_MAP,G_HYBRID_MAP'); ?>
//other codes...


Kannan C comments:

is that worked?


npuleio comments:

Yes it worked, thanks Kannan! :-)

Wonder why in the documentation it wasn't explained the GeoMashup::map() has to be inside The Loop....

2012-02-05

Dylan Kuhn answers:

The page at [[LINK href="http://www.comune.binago.co.it/binago-e-dintorni/"]]http://www.comune.binago.co.it/binago-e-dintorni/[[/LINK]] was loading a reasonable looking map, attached. Now it looks like there are a bunch of points saved at 0,0, and the map is loading there.

Your template code looks correct. I think you've found a bug with the add_map_type_control parameter, which I've [[LINK href="http://code.google.com/p/wordpress-geo-mashup/issues/detail?id=546"]]reported[[/LINK]]. You should be able to change the initial zoom using a zoom=0 parameter, or in the settings. Right now it looks like zoom is set to 15.

The "Select From:" menu shows locations with something in the "Saved Name" field. Once give some locations saved names, they should show up in that menu.