27 Posts
Diegohag
9 years ago
3
Topic

Hi i explain my problem 

I have 3 fields  

address to coordinates / storage standard 

Latitud / storage standard / latitud

Longitud / storage standard / longitud

The 3 fields works perfect if i put the address populate  without problem the lat and long fields. The problem is to show the map on an article 

I have create a freetext field with code {mosmap lat='$cck->getValue ('latitud')'|lon='$cck->getValue ('longitud')'} 

If you see the screenshot the map show but is grey because the Long and lat is not replaced  i can figure the problem on all the post i read and the articles are this code, if i put the long and lat instead $cck->getValue ('longitud')' the map with no problem. 

Any tip will be appreciated thanks

Get a Book for SEBLOD
27 Posts
Diegohag
9 years ago
0
Level 1

When i see the javascript say ""latitude":"$cck->getValue('latitud')","longitude":"$cck->getValue('longitud')" the filds are not rendered and i don´t know why

PCo
9 years ago
0
Level 1

Hi Hertak,

I think it is a syntax error.

Besides there was no screenshot...

See your code

{mosmap lat='$cck->getValue ('latitud')'|lon='$cck->getValue ('longitud')'}

You cannot include an string into another string without probs. Just put it into a var to retrieve it one by one: 

$latitude = $cck->getValue ('latitud');

$longitude = $cck->getValue ('longitud');
{mosmap lat='$latitude'|lon='$longitude'}

Best regards,
Pierre.

27 Posts
Diegohag
9 years ago
0
Level 1

Where can i put the code? If you see the post https://www.seblod.com/community/forums/fields-plug-ins/simple-google-map-integration i use the same solution but in my case don´t work

Get a VIP membership