the grid editor needs another call to render properly. So you can't use Umbraco.Field().
To render the grid editor contents use @CurrentPage.GetGridHtml("propertyAlias") or if you are using strongly typed: @Model.Content.GetGridHtml("propertyAlias").
More information about rendering the grid can be found here.
Like you already said the only issue is that when you scroll in the Grid, the maps start to zoom in/out. So it would definately be great to zoom in/out through a dialog or something and disable the scroll zoom.
thanks for the feedback. Currently working on an update with some more settings. Think it would really be the best to disable the "in map" zoom and just using an external method to set zoom.
Well, the map has a scroll function on the left which is working nicely. My only issue is that scroll-zoom needs to be disabled. I have been playing around with the mapOptions. I added scrollwheel: false. But no luck so far.
How to render GridMap in page content
Hello,
I am trying to insert this package into a content page, but I only can show the plain text with the info I've introduced in backoffice:
{ "name": "1 column layout", "sections": [ { "grid": 12, "rows": [ { "name": "test1", "areas": [ { "grid": 4, "allowAll": false, "allowed": [ "gridMaps" ], "controls": [ { "value": { "latitude": 78.5465, "longitude": -6.654654, "zoom": 6 }, "editor": { "name": "GridMaps", "alias": "gridMaps", "view": "/App_Plugins/GridMaps/Views/gridmapsgrideditor.html", "render": "/App_Plugins/GridMaps/Render/GridMapsGridEditor.cshtml", "icon": "icon-location-nearby", "config": { "defaultLat": 78.5465, "defaultLng": 6.654654, "defaultZoom": 6 } } } ] } ], "id": "fb5df6c8-ffdd-f205-287b-4c82a3720de2" } ] } ] }
I've configured to insert GridMaps as a control in row Grid
I am using: Umbraco version 7.2.5 assembly: 1.0.5610.18894
What else I have to do?
Thanks!
Hi alex,
if you allowed the grid editor in your grid data type and you can use it in the content page then everything should be setup correctly.
The only necessary thing you have to do in frontend is to add a reference to the google js api:
But I wonder why it outputs the grid configuration alongside the editor stuff. That is not normal.
I have tested the package in 7.2.5 and it had worked for me.
Do you use something special to render the grid contents on frontpage?
Do you see any errors in the broswer developer console?
Regards
David
Hi!
Thanks for your quick response. These are the steps I've followed:
:(
Have I omitted some step?
Thanks
Hi Alex,
the grid editor needs another call to render properly. So you can't use Umbraco.Field().
To render the grid editor contents use @CurrentPage.GetGridHtml("propertyAlias") or if you are using strongly typed: @Model.Content.GetGridHtml("propertyAlias").
More information about rendering the grid can be found here.
Regards
David
Hi David,
Thanks a lot. It works perfectly!
Is possible to set the map zoom before render it?
Thanks in advance
HI Alex,
the zoom gets saved when you zoom on the map in the backoffice.
I'm currently working on a package version where the zoom can be set through a dialog.
If it is properly tested I will release it. If you want to help me testing I can send you the package by email.
Regards
David
Great!
Yes, of course. I am now learning and understanding Umbraco, so all I can do to contribute will be ok ;)
with regards
Alex
Hi David. Package is working great. Thanks.
Like you already said the only issue is that when you scroll in the Grid, the maps start to zoom in/out. So it would definately be great to zoom in/out through a dialog or something and disable the scroll zoom.
Hi Arjan,
thanks for the feedback. Currently working on an update with some more settings. Think it would really be the best to disable the "in map" zoom and just using an external method to set zoom.
Regards David
Well, the map has a scroll function on the left which is working nicely. My only issue is that scroll-zoom needs to be disabled. I have been playing around with the mapOptions. I added scrollwheel: false. But no luck so far.
Got it working. scrollwheel: false did the trick. Had a typo ;)
is working on a reply...