jmelosegui / GooglemapMvc

The control wraps Google maps API simplifying the use of Google maps in ASP.NET MVC applications.
MIT License
117 stars 61 forks source link

Map in RenderAction is not visible #115

Closed ogousseau closed 2 years ago

ogousseau commented 8 years ago

Hi,

Merci for your job. I have a problem, when i call this page :

@using Jmelosegui.Mvc.GoogleMap

<div style='width: 100%; height: 300px;'>
    @{ 
        Html.GoogleMap()
        .Name("mapmodule")
        .Height(300)
        .StreetViewControlVisible(false)
        .Center(c => c.Latitude(48.695).Longitude(1.855))
        .Zoom(9)
        .Markers(marker =>
        {
            marker.Add()
                .Latitude(48.695)
                .Longitude(1.855)
                .Title("toto");
        })
        .Render();
    }
</div>

from a another page :

@{ Html.RenderAction("MapModule", "Module", new { id = Model.Id }); }

the map doesn't appear and not code is generated in HTML

Where i wrong ?

Merci pour votre aide. Olivier.

jmelosegui commented 8 years ago

do you get any javascript error (in the browser javascript console)?

ogousseau commented 8 years ago

Hi, sorry i haven't any errors in browser or console.

jmelosegui commented 8 years ago

Did you followed the instructions on https://github.com/jmelosegui/GooglemapMvc#install. Especially the following code at the end of the page?

@section scripts
{
    @(Html.GoogleMap().ScriptRegistrar())
}

Could you create a sample project reproducing this error (here in Github) so I can clone it and try to help?

jmelosegui commented 8 years ago

:eyes:

jmelosegui commented 2 years ago

Feel free to reopen is this is still relevant for you