Support » Plugin: Google Map Shortcode » [Plugin: Google Map Shortcode] Map points empty

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Alex Stanhope

    (@247creative)

    Sorry, I meant v2.1.2 of the plug-in!

    And … it is displaying the map points – but only sometimes!

    When the page is refreshed, it occasionally shows the map points as being in the Atlantic ocean (off the west coast of Africa), but this is wrong, as all the locations should be in Germany!

    I wonder why this is happening! I have a few thoughts on this:

    1: The place names are all German, and so have non-English characters in them (like umlauts and so forth) – perhaps this might be causing an issue?

    2: On the home page of the site, there are around 80 map points (across 5 maps) – perhaps the Google Maps v3 API doesn’t “like” this many requests at one time?

    3: Some of the post names have apostrophe and colon characters in them, for example: Germany Holidays: Miniatur Wunderland, Hamburg’s model railway – again, this might cause a problem to due to these not being escaped possibly?

    As always, I will very much look forward to hearing anyone’s thoughts on this!

    Thread Starter Alex Stanhope

    (@247creative)

    Spotted a few other things!

    With the map points that are wrongly shown in the middle of the sea, it looks like they’re missing their latitudes and longitudes for some reason, as per the following example:

    map_points_canvas_Adxz[14] =
    {“address”:””,
    “lat”:””,
    “long”:””,
    “info”:”<div>Germany Holidays: The Kiel Canal</div> “,
    “icon”:”http://germanyiswunderbar.com/wp-content/uploads/marker-googlemap-small3.png&#8221;};

    Also, I’m running the WP Super Cache plug-in on the site – might this be causing a problem?

    Since the URL file access is disabled on the most servers you need to edit functions.php file.

    find this:
    $api_url = "http://maps.googleapis.com/maps/api/geocode/json?".$type."=".$query."&sensor=false&language=".$options['language'];

    add below:

    $ch = curl_init();
    		curl_setopt ($ch, CURLOPT_URL, $api_url);
    		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    		$json_answ = curl_exec($ch);
    		curl_close($ch);

    remove this:
    $json_answ = file_get_contents($api_url);

    And it’ll work fine!

    hope the developer fix this in the further version.

    Plugin Author alaingg

    (@alaingg)

    allow_url_fopen exception added on version 2.2.1.

    Thanks Tehranshahr!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Google Map Shortcode] Map points empty’ is closed to new replies.