I want to change default startup map location. Currently, it is U.S. I need Turkey on startup.
I tried some values but it says out of range.
The input double value is out of range.
Parameter name: maxY
I have some values like
map.setWorld(21.859076433121025, 33.49920382165604, 47.59255573248409, 44.12420382165604);
latlong.net/place/istanbul-turkey-2242.html
I used this sample code
Html.ThinkGeo().Map("Map1", 600, 500)
.MapBackground(new BackgroundLayer(new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"))))
.MapUnit(GeographyUnit.DecimalDegree)
.CurrentExtent(new RectangleShape(21.859076433121025, 33.49920382165604, 47.59255573248409, 44.12420382165604))
…
.Render();
}
Regards,
How to change startup map for Turkey
Hi Omer,
You just need set the correct current extent.
I think the parameters should be:
public RectangleShape(double minX, double maxY, double maxX, double minY)
Please adjust your parameter order follow this, then that will works.
Regards,
Don
Thanks, I assigned correct values on correct order and worked, but in razor I can not use new RectangleShape, I removed RectangleShape. Do you support RectangleShape on Razor engine?
Regards,
Omer
Hi Omer,
I think our MVC HowDoISamples contains razor sample, you can view it and let me know if I misunderstand your question.
Regards,
Don