When using the Nested Component to assembly maps, can the map position itself so that the distance from the top pin and the bottom pin and the edge are more equal? Right now, it pushes the lowers pin to the very bottom edge of the map.
@Html.Terratype(new Options
{
MapSetId = 2,
Zoom = 5,
Position = new Terratype.CoordinateSystems.Wgs84("-30,130")
})
@foreach (var record in Model.Content.Nested)
{
var name = record.GetPropertyValue<string>("mapName");
var map = record.GetPropertyValue<Terratype.Models.Model>("map");
@Html.Terratype(new Options { MapSetId = 2 }, map,
@<text>
@name is at @map.Position
</text>
)
}
Sadly there is no automated way to allow the map to auto locate & zoom, so that all the icons fit nicely on the map yet. This is on the roadmap of things I plan to write, and has been requested as a feature already
If I had to state a timeline for this, It would be in the next few months or so.
Equalize vertial positioning of map
When using the Nested Component to assembly maps, can the map position itself so that the distance from the top pin and the bottom pin and the edge are more equal? Right now, it pushes the lowers pin to the very bottom edge of the map.
Hi John,
What I see:
Currently you can specify a starting location and zoom level for a map using the Options class in the @Html.Terratype()
Like (Render example 5 from the docs)
Sadly there is no automated way to allow the map to auto locate & zoom, so that all the icons fit nicely on the map yet. This is on the roadmap of things I plan to write, and has been requested as a feature already
If I had to state a timeline for this, It would be in the next few months or so.
Cheers
Jonathan
What about an option to use the positioning/zoom of the first map for the full set, rather than centering of the first pin marker?
Yes, agreed, that is the feature that is being requested. It is on the roadmap.
https://coderwall.com/p/hojgtq/auto-center-and-auto-zoom-a-google-map
Comment author was deleted
+1 on the bounds. So far I like the package but I'm probably gonna have to do the rendering manually.
Google Maps allows to set the bounds\viewport based on the markers and that would be a must-have option for me.
Anyways, good work on the package. I'll use for the editor 'selecting' the marker, but for now; i'll be rendering it manually.
is working on a reply...