Google Map Overlays

This topic contains 2 replies, has 2 voices, and was last updated by  Chris Clinton 9 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #48575

    Chris Clinton
    Free User
    Post count: 29

    I am wondering if anyone has had any luck adding Google Map overlays, like weather, bicycle routes, custom overlays, etc, onto maps in this plugin? I looked into the Custom Google Maps add-on and it isn’t able to provide that type of support. I tried writing some of my own code and adding into into the functions page, similar to what is described here (https://wpgeodirectory.com/docs/customised-maps/) but had no luck. I also see space on the Design>Scripts page in the plugin to add custom scripts to the header and had no luck. I am hoping someone else has been successful.

    #48581

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Chris,

    This is not possible by default, but i just did a quick test and if you add these lines to map.js below line 32 then it shows bike lanes:

    so in file geodirectory/geodirectory-functions/map-functions/js/map.js

    Change line 32 from:

    jQuery("#" + map_canvas).goMap(options);

    to:

    
    
     jQuery("#" + map_canvas).goMap(options);
        var bikeLayer = new google.maps.BicyclingLayer();
        bikeLayer.setMap(jQuery.goMap.map);

    This is a temp solution as a proof of concept, it would need work and probably core modifications to implement.

    Thanks,

    Stiofan

    #48587

    Chris Clinton
    Free User
    Post count: 29

    Thank you. That is working perfectly.

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount