Google map overlay on admin mappress area

Home Forums MapPress Support Google map overlay on admin mappress area

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13787
    VitaminDave
    Participant

    Hi,

    I managed to add a tiled overlay to the generated mappress maps on a site I’m working on through Jquery. I used the the handler of id with the class ‘mapp-canvas’……. Eg: id=”mapp0″…….and using the .getMap() function….. mapp0.getMap(); I was able to access the google map to add the tiles.

    The client then wanted to see the overlay in the ‘Edit Page’ mapppress admin area so that they could drop markers to precise areas on the overlay.

    I tried a similar approach by trying to use the id=”mapp_edit” to use the getMap() function on it, but I’m getting the error “Object [object Object] has no method ‘getMap'”. I even delayed trying to put the tiles on the map until the map had loaded after the ‘edit’ hyperlink was clicked with no success.

    Any idea how I could apply the tiles to this map in the admin area?

    Many thanks in advance
    D

    #13835
    Chris
    Keymaster

    Hi,

    From version 2.40.8 you can get the editor with:
    window.mappEditor

    You can get the current MapPress map object using:
    window.mappEditor.getMap().getMap();

    To get the *Google* map object use:
    window.mappEditor.getMap().getMap();

    #13836
    VitaminDave
    Participant

    Many thanks Chris. Our client is delighted with us being able to implement custom overlays on the editor! Awesome plugin, very best of luck with its future development!

    Dave

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.