When you drag the marker instead of using the searchfield for selecting a location in the backend, the searchfield offcourse will be empty. But when the searchfield is left empty, the map won’t show up in the frontend.
This is possibly done to check if a location is set or not, but it would be better to compare the coordinates with the Default Location.
In my case (don’t know how/why) the content editor added a lot of locations but some of them has an empty searchfield.
On a general note, it is possible to config a Terratype map to have no search field present and the Maps should still render fine.
I could try and replicate your issue, if you pasted the html code that your razor template outputs (I only need the relevant snipet that is to do with Terratype), for example for the second screenshot above it was
At the moment there is no way to check whether the content editor has selected a location or left it at the default location. Obviously this is something you can check with a hardcoded if statement, but that would be of the utmost hackiness and I can feel your repulsion to doing this.
I have been asked to allow null or empty map positions, so a content editor can set the map to point to nothing. This would included allowing the default location to be null too. This would be a better approach for your situation, but sadly while it is on the roadmap, its not something I can see being written by me this year.
Map doesn't display when searchfield is empty
When you drag the marker instead of using the searchfield for selecting a location in the backend, the searchfield offcourse will be empty. But when the searchfield is left empty, the map won’t show up in the frontend.
This is possibly done to check if a location is set or not, but it would be better to compare the coordinates with the Default Location.
In my case (don’t know how/why) the content editor added a lot of locations but some of them has an empty searchfield.
Hi Robbie,
Sadly I've been unable to replicate
Here is a screenshot of a Google Map with an empty search field, and where I have personally dragged the map marker to hover over Southampton
And here is that same map being rendered in the front end using only the command
On a general note, it is possible to config a Terratype map to have no search field present and the Maps should still render fine.
I could try and replicate your issue, if you pasted the html code that your razor template outputs (I only need the relevant snipet that is to do with Terratype), for example for the second screenshot above it was
Cheers
Jonathan Richards
Sorry for your precious time. Must have suffered from the sun.
I will just embarrass myself
It all works as it should. I added an extra check to verify that a location was chosen :-)
Is there another possibility to check whether the location has been deliberately chosen. so compare with the default location?
Hi Robbie,
At the moment there is no way to check whether the content editor has selected a location or left it at the default location. Obviously this is something you can check with a hardcoded if statement, but that would be of the utmost hackiness and I can feel your repulsion to doing this.
I have been asked to allow null or empty map positions, so a content editor can set the map to point to nothing. This would included allowing the default location to be null too. This would be a better approach for your situation, but sadly while it is on the roadmap, its not something I can see being written by me this year.
Cheers
Jonathan
Hi Jonathan,
Yes, I now use a hardcoded if statement.
I keep an eye on your work ;-)
Thanks for making a great package.
is working on a reply...