Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
rajiv jackz
How to implement Google Map in spring MVC portlet
22 de Maio de 2011 20:53
Resposta

rajiv jackz

Ranking: Junior Member

Mensagens: 92

Data de entrada: 18 de Maio de 2011

Mensagens recentes

HI all,

How to implement Google Map in spring MVC portlet, I have list of addresses in database

Thanks in advance!
Help me out here
Mika Koivisto
RE: How to implement Google Map in spring MVC portlet
26 de Maio de 2011 10:38
Resposta

Mika Koivisto

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1501

Data de entrada: 7 de Agosto de 2006

Mensagens recentes

You should refer to Google Maps API.
rajiv jackz
RE: How to implement Google Map in spring MVC portlet
26 de Maio de 2011 18:51
Resposta

rajiv jackz

Ranking: Junior Member

Mensagens: 92

Data de entrada: 18 de Maio de 2011

Mensagens recentes

thank u ..
Carlos Fdo. Afanador M.
RE: How to implement Google Map in spring MVC portlet
24 de Setembro de 2012 15:01
Resposta

Carlos Fdo. Afanador M.

Ranking: New Member

Mensagens: 14

Data de entrada: 26 de Junho de 2009

Mensagens recentes

Hi Mika...

I'm wondering if you can help me with this issue. I'm trying to build a portlet in LF 6.1 as a plugin liferay ide and the simplest way of use the google map api v3 didn't not work for me...i have a portlet using Liferay MVC.

In a simple jsp (and all the portlet is just this lines :S) i have:

 1
 2<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=my_key&sensor=false" ></script>
 3<script type="text/javascript">
 4
 5AUI().ready('event', 'node', function(A){
 6    var mapOptions = {
 7            center: new google.maps.LatLng(-34.397, 150.644),
 8            zoom: 8,
 9            mapTypeId: google.maps.MapTypeId.SATELLITE
10    };
11    var map = new google.maps.Map(A.one("#<portlet:namespace />map"), mapOptions);
12});
13   
14</script>
15<aui:form name="fm">
16    <aui:fieldset>
17        <aui:layout>
18            <div class="maps-content" id="<portlet:namespace />map"></div>
19        </aui:layout>
20    </aui:fieldset>
21</aui:form>


Thanks in advance!!
Mika Koivisto
RE: How to implement Google Map in spring MVC portlet
26 de Setembro de 2012 15:30
Resposta

Mika Koivisto

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1501

Data de entrada: 7 de Agosto de 2006

Mensagens recentes

A.one() returns a Node object so you might need to call .getDOM() on it like this:
1var map = new google.maps.Map(A.one("#<portlet:namespace />map").getDOM(), mapOptions);
Carlos Fdo. Afanador M.
RE: How to implement Google Map in spring MVC portlet
26 de Setembro de 2012 19:02
Resposta

Carlos Fdo. Afanador M.

Ranking: New Member

Mensagens: 14

Data de entrada: 26 de Junho de 2009

Mensagens recentes

Hi Mika....

I'm really grateful to you for your help, i think that is an advance, but something really strange is happening; then i will attach to you an image that show the portlet and as you can see the div have the entire information of the map, but for some reasson that information isn't displayed; i don´t have any UI experience so i don't know what may be going...

Once again, thanks a lot!
Anexo

Anexos: Untitled.png (545,7k)
Mika Koivisto
RE: How to implement Google Map in spring MVC portlet
2 de Outubro de 2012 12:15
Resposta

Mika Koivisto

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1501

Data de entrada: 7 de Agosto de 2006

Mensagens recentes

The surrounding div the one you've highlighted might need width and height. I'm also more of a backend guy so I really don't know what's going in wrong.
Carlos Fdo. Afanador M.
RE: How to implement Google Map in spring MVC portlet
9 de Outubro de 2012 09:15
Resposta

Carlos Fdo. Afanador M.

Ranking: New Member

Mensagens: 14

Data de entrada: 26 de Junho de 2009

Mensagens recentes

Hi Mika....

Thanks a lot for your unselfish help, i will post here if i have some progress related to this issue.