-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing usage documentation #28
Comments
@craigs100 Thanks for your feedback, this is indeed something that can be improved (documentation/readme PRs are welcome) 👍 This editor works just like all other 'complex' editors: it returns a model/class containing the map data. Using
The test site is included in the source code, so you need to clone the repository and run the site locally. |
Thanks for the clarification on the test site address. Maybe I'm getting null on the Model.Value("map") because it's not saving properly. I have another issue in for in for that #29. |
A question - The Readme doc mentions that config for the API key, etc. should be set in Web.config/appsettings.json, but when you create the DataType via the back-office, there are fields there for API key, etc. Is this so that you can created multiple Map DataTypes with different config? If you have it set on the DataType, does it then negate the need for text-file config updates, or...? |
@hfloyd the setting in the prevalues for the DataType is more for backwards compatibility, but you should be able use this instead of the appsettings.json/web.config, yes. |
So, if you leave the fields blank on the data type, it will just use the config file, then? |
@hfloyd correct :) |
Is it possible to contribute to the "Wiki" tab, somehow? Suggested Documentation topics: Installing & Configuring (NuGet, Web.config/AppSettings, DataType setup) Troubleshooting |
@hfloyd I've created a couple of placeholder pages based on your suggestions - can you do an experiment and see if you can submit edits? |
Hi @robertjf I was able to Clone the wiki without issues: But there is no Fork option. I made some local changes, but I am not able to push them
Another option which would allow forks/PRs is to use a Docs folder and GitHub pages |
@hfloyd you should have access now |
@ArnoldV Yes, thanks. Pushing to the WIKI repo now works. |
Is there no longer a method to render the actual Google map to a page? |
It's just a bit of javascript. No different to any other implementation of a Google map. Here's my implementation if it helps...
|
That’s great. Thanks Craig.
From: Craig ***@***.***>
Sent: 01 July 2022 15:16
To: ArnoldV/Our.Umbraco.GMaps ***@***.***>
Cc: Sam Gooch ***@***.***>; Comment ***@***.***>
Subject: Re: [ArnoldV/Our.Umbraco.GMaps] Missing usage documentation (#28)
Is there no longer a method to render the actual Google map to a page?
It's just a bit of javascript. No different to any other implementation of a Google map. Here's my implementation if it helps...
<h4>Map</h4>
<div id="map-canvas" style="width:100%;height:300px"></div>
<script>
var map;
var property = ***@***.***';
@{
var homeCoords = Model.GoogleMap.Address.Coordinates.Latitude.ToString() + ',' + Model.GoogleMap.Address.Coordinates.Longitude.ToString();
var zoom = Model.GoogleMap.MapConfig.Zoom;
}
function initMap() {
var home = new ***@***.***);
var map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: @zoom,
center: home,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var marker = new google.maps.Marker({
position: home,
map: map
});
}
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=@(Model.GoogleMap.MapConfig.ApiKey)&callback=initMap"></script>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA52DNTU7WRKWQPN3LYM4PDVR34RPANCNFSM4TJI5BQA>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
|
Hi, I've tried using Model.Value("propertyAlias") but getting type or namespace could not be found Umbraco 9 |
It would be very helpful if you could give an example of how you get the map data out of the datatype in a view. The instructions just tell you how to install it, not how to use it.
var map = Model.Value("map") doesn't seem to work. (Umb 8.9.0) so I'm now stuck.
Also could you either add a link to the test site mentioned or remove the credentials if it doesn't exist?
Thanks.
The text was updated successfully, but these errors were encountered: